Collaborative phenotyping effort of European Drosophila melanogaster populations
Genomic analyses (Kapun et al. 2020) showed that there is longitudinal population structure, continent-wide sweeps, candidate genes for local climate adaptation by using 48 pooled population samples from 32 locations.
In 2017, DrosEU consortium has decided to make a collaborative phenotyping effort of European Drosophila melanogaster populations at the Groningen meeting.
The call was made with approximate numbers of populations, lines, etc. and under predefined criteria (finish within a year, reps, blocks, etc) and participating labs have indicated which traits they are willing to phenotype.
Nine sampling locations were chosen based on genomic data and cover a wide range of latitude (~20°) and longitude (~40°) across the continent (see table below). From each location, 15 to 20 isofemale lines were established in corresponding labs at the sampling location and the isofemale lines were centrally maintained by Élio Sucena at Instituto Gulbenkian de Ciência (IGC), Lisbon, Portugal. A total of 173 isofemale lines were used in this study.
| Country | Location | Latitude | Longitude | Altitude | Collector |
|---|---|---|---|---|---|
| Portugal | Recarei | 41.150 | -8.410 | 175 | Jorge Vieira |
| Spain | Gimenells (Lleida) | 41.618 | 0.620 | 173 | Josefa Gonzalez |
| Denmark | Karensminde | 55.945 | 10.213 | 15 | Mads Schou |
| Germany | Munich | 48.180 | 11.610 | 520 | Amanda Glaser-Schmitt |
| Austria | Mauternbach | 48.375 | 15.560 | 572 | Andrea Betancourt |
| Finland | Akaa | 61.100 | 23.520 | 88 | Maaria Kankare |
| Ukraine | Uman | 48.753 | 30.206 | 214 | Iryna Kozeretska |
| Turkey | Yesiloz | 40.231 | 32.260 | 680 | Banu Onder |
| Russia | Valday | 57.979 | 33.244 | 217 | Elena Pasyukova |
## Scale on map varies by more than 10%, scale bar may be inaccurate
Contributed labs are Abbott, Bergland, Billeter, Colinet, Flatt, Fricke, Gibert, Gonzalez, Grath, Hoedjes, Kozeretska, Mensch, Onder, Parsch, Pasyukova, Posnien, Ritchie, Schlötterer, Schmidt, Stamenkovic-Radak, Sucena, Tauber, Vieira, Wegener, Zwaan and detailed list below :
| Country | Lab | PI | Trait |
|---|---|---|---|
| Sweden | Lund | Abbott | Pigmentation |
| USA | Charlottesville | Bergland | Diapause |
| The Netherlands | Groningen | Billeter | Fecundity |
| France | Rennes | Colinet | Dry weight |
| Switzerland | Fribourg | Flatt | Diapause |
| Switzerland | Fribourg | Flatt | Lifespan |
| Germany | Muenster | Fricke | Fecundity |
| France | Lyon | Gibert | Development time |
| France | Lyon | Gibert | Pigmentation |
| France | Lyon | Gibert | Viability |
| Spain | Barcelona | Gonzalez | Cold-shock mortality |
| Spain | Barcelona | Gonzalez | Starvation resistance |
| Germany | Munich | Grath | Development time |
| Germany | Munich | Grath | Viability |
| The Netherlands | Lausanne | Hoedjes | Development time |
| The Netherlands | Lausanne | Hoedjes | Dry weight |
| The Netherlands | Lausanne | Hoedjes | Viability |
| Ukraine | Kyiv | Kozeretska | Cold-shock mortality |
| Ukraine | Kyiv | Kozeretska | Thorax length |
| Argentina | Buenos Aiers | Mensch | Chill-coma recovery time |
| Turkey | Ankara | Onder | Dry weight |
| Turkey | Ankara | Onder | Starvation resistance |
| Turkey | Ankara | Onder | Wing area |
| Germany | Munich | Parsch | Heat-shock mortality |
| Germany | Munich | Parsch | Lifespan |
| Russia | Moscow | Pasyukova | Lifespan |
| Russia | Moscow | Pasyukova | Starvation resistance |
| Germany | Göttingen | Posnien | Thorax length |
| Germany | Göttingen | Posnien | Wing area |
| UK | St Andrews | Ritchie | Thorax length |
| UK | St Andrews | Ritchie | Wing area |
| UK | St Andrews | Ritchie | Wing patterning |
| Austria | Vienna | Schlötterer | Diapause |
| USA | Philadelphia | Schmidt | Development time |
| USA | Philadelphia | Schmidt | Pigmentation |
| USA | Philadelphia | Schmidt | Thorax length |
| USA | Philadelphia | Schmidt | Time to pupation |
| USA | Philadelphia | Schmidt | Viability |
| Serbia | Belgrade | Stamenkovic-Radak | Development time |
| Serbia | Belgrade | Stamenkovic-Radak | Viability |
| Serbia | Belgrade | Stamenkovic-Radak | Wing area |
| Portugal | Lisbon | Sucena | Fly husbandry |
| Israel | Haifa | Tauber | Locomotor activity |
| Portugal | Porto | Vieira | Chill-coma recovery time |
| Portugal | Porto | Vieira | Cold-shock mortality |
| Portugal | Porto | Vieira | Heat-shock mortality |
| Germany | Würzburg | Wegener | Circadian eclosion timing |
| The Netherlands | Wageningen | Zwaan | Development time |
| The Netherlands | Wageningen | Zwaan | Viability |
Esra Durmaz (all), Envel Kerdaffrec (all), Katja Hoedjes (Via, DT, DW), Banu Onder (SR, WA), Marija Tanaskovic (WA), Chris Wegener (CET), Eran Tauber (LA), Rudolf Rohr (UniFr), coordination-team
wolbachia_pop_freqs # Wolbachia frequency by country and population abbreviation
## Country Population Wolbachia_Freq
## 1 Finland AK 100.00000
## 2 Portugal GI 66.66667
## 3 Denmark KA 85.00000
## 4 Austria MA 75.00000
## 5 Germany MU 94.73684
## 6 Spain RE 47.05882
## 7 Ukraine UM 69.23077
## 8 Russia VA 75.00000
## 9 Turkey YE 85.00000
Contributors and methods for experiments
3-5 day old adults (at least 25 pairs) are allowed to lay eggs en masse. Yeast is provided to stimulate egg laying (for at least 2 hours). Eggs are collected, and 40 are placed in each vial1. Viability is calculated per vial, as the percentage of individuals that emerged from the 40 eggs.
Please see below number of
Developmental time is scored as both the egg-to-pupa and egg-to-adult development time. Both were scored twice a day, when the chamber lights are turned on and two hours before they are turned off. In order to measure the egg-to-pupa developmental time, the spot where a pupa is found is marked with a permanent marker to keep track of which pupae have emerged in each day. The egg-to-adult developmental time is estimated by counting all emerged adults from the vial, and by sexing them.
At day 7 after emergence, flies are killed by snap freezing them in liquid nitrogen, by putting them at -20ºC or by putting them into an ethyl acetate solution and stored at -20ºC. Then they are sexed and placed into 96 wells plates, and placed in an oven set at 60-70 °C, for at least 3 days. At this point flies can be stored at room temperature using a protective cover. If this is the case, the day before measurements are made dry flies are again placed for 24h in the oven (60-70 °C) to ensure material is well dehydrated. Flies are then placed on a small piece of aluminium foil for direct weight measurement on microbalance (accuracy 1µg).
Five to seven days old flies are placed onto a double-sided sticky tape attached to a microscope slide and a picture of the thorax taken using a digital camera connected to a dissecting microscope. The same magnification and resolution is always used to increase reproducibility, and a scale bar inserted on each photo to allow transforming pixels into µm units. Thorax length is defined as the distance from the anterior margin of the thorax to the posterior tip of the scutellum and it is measured using the “Straight Line” in ImageJ/Fiji.
Both the left and right wings of five to seven days old flies (10 flies per sex per replicate) are removed and placed into a drop of Entellan®Merck, Hoyer’s Medium, sticked to a double-side sticky tape, or taped directly to the slide. Pictures of the wing preparations are taken using a digital camera connected to a dissecting microscope. The same magnification and resolution is always used to increase reproducibility. A scale bar is placed on each photo to allow transforming pixels into µm units. Manual measurements of wing length and wing area are performed using the “Straight Line” and “Polygon Selection” tools, respectively of ImageJ/Fiji (10.1371/journal.pone.0000007).
For each isofemale line, 10 males and 10 females are placed together in single-sex groups and allowed to mature for five days. Then, they are placed together (5-7 pairs), and mating interactions observed to ensure successful mating (at least 10 min copulation duration) to ensure that we have five successfully mated females. After a successful mating, males are discarded and females allowed to oviposit alone for 48 hours, moved to another vial, and allowed to oviposit for four days, and again moved to another vial and allowed to oviposit for two days to check that of egg-laying stopped. Vials are incubated until all offspring is born. Individuals are then frozen and the offspring counted.
Line level lifespan: Ten flies per sex/line are placed in each vial. The age at death will be scored when changing the food, at least three times a week. Five replicates are used.
Population level lifespan: Flies are kept in 1L demography cages (5 flies per line/sex for each population). The age at death will be scored when changing the food, at least three times a week. Ten replicates were performed.
Batches of 15-20 seven days old flies are placed for 18 hours in an empty vial immersed in an ice-water slurry box placed at a 4°C room for 18 hours. Then the vials are removed to a bench in a 25°C room and mortality scored 24 hours later.
Sexed flies are placed in an empty vial immersed in an ice-water slurry box placed at a 4°C room in the morning. Six hours later, flies are removed from the tube to individual wells of 24 well plates while being kept on ice. A timer is started once the plate is moved from the ice to a bench in a 25°C room. Each fly is checked by eye for recovery for a maximum of 60 minutes. Flies that are able to stand on their legs are considered recovered and the CCRT (in seconds) recorded.
Batches of 15-20 seven days old flies are placed in empty vials inside a 37ºC incubator and mortality checked for 7 hours every 30 minutes.
In order to induce diapause, two hour old ‘phenotypic virgins’ (pharate or melanized with meconium visible) female flies are exposed to 12°C and 10:14 light/dark hours for 3 weeks, using an incubator that allows temperature tracking. Vials are changed once per week. After three weeks under diapause conditions, flies are frozen at -80C until dissection. Both ovaries will be examined and classified according to the following simplified ‘classification’: 1) < stage 10: diapause; 2) stage 10-13: intermediate; 3) stage 14: non-diapause.
The eclosion rhythmicity has been measured in outcrossed Munich, Akaa, Gimenells, Uman, Mauternbach, Karensminde, Valday, Yesiloz and Recarei strains at:
LD14:10 @ 29°C, flies raised at 29°C
DD 29°C after LD14:10 entrainment, flies raised at 29°C
LD14:10 @ 18°C, flies raised at 18°C
DD 18°C after LD14:10 entrainment, flies raised at 18°C
The locomotor activity of the flies (males only) was measured using the DAM2 Drosophila monitors (Trikinetics Inc., Waltham, MA). Flies were 1-3 days old. Single flies were placed in glass tubes (10 cm × 0.5 cm) that were filled with 2 cm sugar/agar medium. The monitors were placed in light chambers driven by LED, in an incubator at 24°C, ~30% humidity. The flies were entrained to a light-dark cycle (LD 12:12) for 5d and then allowed to free-run for 10 d in constant darkness (DD). The activity data were processed into 30 min bins, and four different variables were analysed. These included the circadian period, and the phase, which were analyzed using the FFT NLLS algorithm available at the BioDare2 server (https://biodare2.ed.ac.uk/). The other two variables, level of activity and the nocturnal/diurnal ratio were analyzed by a custom-made R script.
Batches of 10 sexed flies are transferred to glass vials filled with 5 mL of 2% agar for starvation 3-7 days after eclosion. The age at death will be scored every 8 hours.
For each line, 10 females, 13-15 days old, either alive or stored in 95% ethanol, are air dried and placed on their left side, and pictures taken using a dissecting microscope. Images are then analysed in ImageJ 1.46r, using the Area Fraction measurement in the Analyze menu. Area Fraction measures the percentage of pixels in a selected area that have been highlighted in red using the Threshold tool. This gives an estimate of the percentage of dark pigmentation on the three terminal tergites of the abdomen (4, 5 and 6).
MasterSheets
All data files are reformatted as so called Master Sheets , in which the data structure is the same for all the sub-data sets and all details/edits logged in a README sheet.
| Headers | Descriptions |
|---|---|
| Supervisor/PI | Lab identifier |
| Diet | Either standardized S or non-standardized NS |
| Batch | From 1 to n |
| Population | Population identifier in abbreviated form (i.e. AK) |
| Line | Line identifier (i.e. MU1) |
| Sex | Either female (F) or male (M) |
| ReplicateVial | Replicate identifier (from 1 to n) |
| TraitValue | Trait value in x units |
## Warning in instance$preRenderHook(instance): It seems your data is too big
## for client-side DataTables. You may consider server-side processing: https://
## rstudio.github.io/DT/server.html
For each trait, sex and lab, we run counts for population, line and replicate vial (if applicable).
insert count table
text BLA BLA BLA
Here is an example code for tables (egg-to-adult viability). The very same code is used for other traits (either with or without Batch) by filtering the data at supervisor, batch, population and/or line levels (and also for sex, if applicable).
## First defined standard error and coefficient of variation
std_err <- function(x) sd(x)/sqrt(length(x))
coef_var <- function(x) sd(x)/mean(x)
estimate_mode <- function(v) {
uniqv <- unique(v)
uniqv[which.max(tabulate(match(v, uniqv)))]
}
# Then compute descriptive statistics (mean, median, minimum, maximum, standard error, coefficient of variation and mode) at the defined levels (line with batch information example below) :
table_Via_Line_wbatch <- write.csv(d_Via %>% group_by(Supervisor.PI, Batch, Population, Line) %>% summarise_at(vars(ProportionEggtoAdultSurvival), list(Mean = mean, SD= sd, Median = median, Min = min, Max = max, SE = std_err, CV = coef_var, Mode = estimate_mode)), file = "Viability/table_Via_Line_wbatch.csv", row.names = T)
table_Via_Line_wbatch <- read.csv("Viability/table_Via_Line_wbatch.csv") #file name is here
Tables for descriptive statistics at population and line levels can be found in the trait directory, under the file name table_TraitAbbreviation_Level_BatchInfo.csv (i.e. Viability/table_Via_Line_wobatch.csv)
Data range is calculated with #r min() and #r max() functions for each trait.
y-axis on the figures is scaled by the minimum (#r min_trait) and maximum (#r max_trait) values in the full data set for a given trait.
The very same ggplot theme has been used all across the document, called droseu_theme
droseu_theme <- theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(), panel.background = element_blank(), axis.line = element_line(colour = "black",), axis.title.x = element_text(size = 16), axis.text.x = element_text(size = 16),axis.text.y = element_text(size = 16),axis.title.y = element_text(size = 16))
p_TraitAbbreviation_Lab + ylim(c(min_trait, max_triat)) + droseu_theme
Here is an example code for figures (egg-to-adult viabiliy, Gibert Lab). The very same code is used to generate plots for other contributing labs and traits (either for Batch or Population) by filtering the data at supervisor level (for females and males separately, if applicable).
p_Via_Gibert <- ggplot(data = (subset(d_Via,Supervisor.PI=='Gibert')), #subsets for supervisor
aes(x=Population_Lat, y=ProportionEggtoAdultSurvival, fill=Batch)) + #define x- and y-axis
geom_boxplot(outlier.shape = NA, notch=FALSE) + #boxplot
labs(title="p_Via_Gibert", x="Population", y = "ProportionEggtoAdultSurvival") +
ylim(c(min_Via, max_Via)) +
droseu_theme #y-axis limits, axis labels and droseu_theme
pdf(file="Viability/p_Via_Gibert.pdf",width=8, height=5)
p_Via_Gibert
dev.off()
Here is an example code for linear models (egg-to-adult development time, males, Gibert Lab). The very same code is used for other contributing labs and traits by filtering the data at supervisor level (for females and males separately, if applicable), adding or removing factors if they cause singularity problems (i.e. if only one replicate vial has been phenotyped per line and/or population and/or batch, the lowest level [ replicate_vial in this example] has been dropped from given model).
DT_A_M_lmer_Gibert <- lmer(DT_EggAdult ~ -1 + Population + (1|Line:Population) + #Line (random) is nested in Population (fixed)
(1|Batch) + #Batch is a random effect
(1|ReplicateVial : Line), #Replicate vial (random) is nested in Line (random)
data = d_DT_A_M[d_DT_A_M$Supervisor.PI == "Gibert",]) #Filter by Lab in development time, males data
capture.output(summary(DT_A_M_lmer_Gibert),file = "DevelopmentTime/DT_A_M_lmer_Gibert_sum.txt") #save output summary
capture.output(anova(DT_A_M_lmer_Gibert),file = "DevelopmentTime/DT_A_M_lmer_Gibert.txt") #save anova output
capture.output(emmeans(DT_A_M_lmer_Gibert, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "DevelopmentTime/DT_A_M_lmer_Gibert_tk.txt") #run and save post-hoc test (tukey) output
anova(DT_A_M_lmer_Gibert) #print anova output
summary(DT_A_M_lmer_Gibert) #print model output summary
Analyses outputs can be found in the trait directory, under the file name TraitAbbreviation_Sex_Function_LabIdentifier.txt (i.e. DevelopmentTime/DT_A_M_lmer_Gibert.txt)
Please note that “Plots and Linear Models by Lab” are presented in alphabetical order.
dir.create(file.path("Viability"), showWarnings = FALSE)
For a detailed description of tables, plots, linear models and outputs, please refer here
Gibert Lab :Cristina Vieira, Laurence Mouton, Natacha Kremer, Sonia Martinez, Patricia Gibert
Grath Lab : Ingo Müller, Sonja Grath
Hoedjes Lab : Hristina Kostic, Katja Hoedjes
Schmidt Lab : Ozan Kiratli, Yonatan Babore, Liam Forsythe, Paul Schmidt
Stamenkovic-Radak Lab : Marija Savic Veselinovic, Marija Tanaskovic, Aleksandra Patenkovic, Mihailo Jelic, Katarina Eric, Pavle Eric, Slobodan Davidovic, Marina Stamenkovic-Radak
Zwaan Lab : Joost van den Heuvel, Bas Zwaan
ifelse(!dir.exists(file.path("Viability")), dir.create(file.path("Viability")), FALSE)
Reading data in R
d_Via <- read.csv("MasterSheets_Oct21_git/VIA_MasterSheet_Oct21.csv")
str(d_Via)
## 'data.frame': 2367 obs. of 12 variables:
## $ Supervisor.PI : chr "Gibert" "Gibert" "Gibert" "Gibert" ...
## $ Diet : chr "NS" "NS" "NS" "NS" ...
## $ Batch : int 1 1 1 1 1 1 1 1 1 1 ...
## $ Population : chr "AK" "AK" "AK" "AK" ...
## $ Line : chr "AK1" "AK1" "AK1" "AK10" ...
## $ ReplicateVialOld : int 1 2 3 1 2 3 1 2 3 1 ...
## $ ReplicateVial : chr "Gibert_1_AK1_1" "Gibert_1_AK1_2" "Gibert_1_AK1_3" "Gibert_1_AK10_1" ...
## $ ProportionEggtoAdultSurvival: num 0.68 0.73 0.63 0.85 0.75 0.8 0.85 0.88 0.7 0.68 ...
## $ Country : chr "Finland" "Finland" "Finland" "Finland" ...
## $ Latitude : num 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 ...
## $ Longitude : num 23.5 23.5 23.5 23.5 23.5 ...
## $ Altitude : int 88 88 88 88 88 88 88 88 88 88 ...
Factors need reformatting (i.e. Supervisor.PI should be coded as a factor, not character).
str(d_Via)
## 'data.frame': 2367 obs. of 12 variables:
## $ Supervisor.PI : chr "Gibert" "Gibert" "Gibert" "Gibert" ...
## $ Diet : chr "NS" "NS" "NS" "NS" ...
## $ Batch : int 1 1 1 1 1 1 1 1 1 1 ...
## $ Population : chr "AK" "AK" "AK" "AK" ...
## $ Line : chr "AK1" "AK1" "AK1" "AK10" ...
## $ ReplicateVialOld : int 1 2 3 1 2 3 1 2 3 1 ...
## $ ReplicateVial : chr "Gibert_1_AK1_1" "Gibert_1_AK1_2" "Gibert_1_AK1_3" "Gibert_1_AK10_1" ...
## $ ProportionEggtoAdultSurvival: num 0.68 0.73 0.63 0.85 0.75 0.8 0.85 0.88 0.7 0.68 ...
## $ Country : chr "Finland" "Finland" "Finland" "Finland" ...
## $ Latitude : num 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 ...
## $ Longitude : num 23.5 23.5 23.5 23.5 23.5 ...
## $ Altitude : int 88 88 88 88 88 88 88 88 88 88 ...
d_Via$Supervisor.PI <- as.factor(d_Via$Supervisor.PI)
d_Via$Diet <- as.factor(d_Via$Diet)
d_Via$Batch <- as.factor(d_Via$Batch)
d_Via$Population_Lat <- factor(d_Via$Population, levels= c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))
d_Via$Population_Lon <- factor(d_Via$Population, levels= c("RE","GI","KA","MU","MA","AK","UM","YE","VA"))
d_Via$Population_Alt <- factor(d_Via$Population, levels= c("KA","AK","GI","RE","UM","VA","MU","MA","YE"))
d_Via$Line <- as.factor(d_Via$Line)
d_Via$ReplicateVial <- as.factor(d_Via$ReplicateVial)
d_Via$ProportionEggtoAdultSurvival <- as.numeric(d_Via$ProportionEggtoAdultSurvival)
d_Via$Country <- as.factor(d_Via$Country)
d_Via$Latitude <- as.numeric(d_Via$Latitude)
d_Via$Longitude <- as.numeric(d_Via$Longitude)
d_Via$Altitude <- as.numeric(d_Via$Altitude)
# Now they should be in the correct format, see below.
str(d_Via)
## 'data.frame': 2367 obs. of 15 variables:
## $ Supervisor.PI : Factor w/ 6 levels "Gibert","Grath",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Diet : Factor w/ 1 level "NS": 1 1 1 1 1 1 1 1 1 1 ...
## $ Batch : Factor w/ 4 levels "1","2","3","4": 1 1 1 1 1 1 1 1 1 1 ...
## $ Population : chr "AK" "AK" "AK" "AK" ...
## $ Line : Factor w/ 172 levels "AK1","AK10","AK11",..: 1 1 1 2 2 2 4 4 4 9 ...
## $ ReplicateVialOld : int 1 2 3 1 2 3 1 2 3 1 ...
## $ ReplicateVial : Factor w/ 2367 levels "Gibert_1_AK1_1",..: 1 2 3 4 5 6 7 8 9 10 ...
## $ ProportionEggtoAdultSurvival: num 0.68 0.73 0.63 0.85 0.75 0.8 0.85 0.88 0.7 0.68 ...
## $ Country : Factor w/ 9 levels "Austria","Denmark",..: 3 3 3 3 3 3 3 3 3 3 ...
## $ Latitude : num 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 ...
## $ Longitude : num 23.5 23.5 23.5 23.5 23.5 ...
## $ Altitude : num 88 88 88 88 88 88 88 88 88 88 ...
## $ Population_Lat : Factor w/ 9 levels "YE","RE","GI",..: 9 9 9 9 9 9 9 9 9 9 ...
## $ Population_Lon : Factor w/ 9 levels "RE","GI","KA",..: 6 6 6 6 6 6 6 6 6 6 ...
## $ Population_Alt : Factor w/ 9 levels "KA","AK","GI",..: 2 2 2 2 2 2 2 2 2 2 ...
# Voila!
Descriptive statistics at the line level, with batch information :
Descriptive statistics at the line level, without batch information :
Descriptive statistics at the population level, with batch information :
Descriptive statistics at the population level, without batch information :
min_Via <- min(d_Via$ProportionEggtoAdultSurvival)
max_Via <- max(d_Via$ProportionEggtoAdultSurvival)
y-axis is scaled by the minimum (0) and maximum (1) values in the full data set.
model_means_Via_Gibert <- emmeans(object = Via_lmer_Gibert, specs = ~ Population)
model_means_Via_Gibert_cld <- cld(object = model_means_Via_Gibert, adjust = "Tukey", Letters = letters, alpha = 0.05) %>% as.data.frame %>% mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))) %>% arrange(Population) %>% dplyr::rename(cld = .group)
## Note: adjust = "tukey" was changed to "sidak"
## because "tukey" is only appropriate for one set of pairwise comparisons
anova(Via_lmer_Gibert)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 37.336 4.1485 9 2 451.29 0.002213 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(Via_lmer_Gibert)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula:
## ProportionEggtoAdultSurvival ~ -1 + Population + (1 | Line:Population) +
## (1 | Batch)
## Data: d_Via[d_Via$Supervisor.PI == "Gibert", ]
##
## REML criterion at convergence: -687.4
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -4.8895 -0.5220 0.0038 0.5549 2.4861
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 1.064e-02 0.103146
## Batch (Intercept) 6.195e-05 0.007871
## Residual 9.192e-03 0.095877
## Number of obs: 532, groups: Line:Population, 169; Batch, 3
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 0.75693 0.02658 51.26245 28.48 <2e-16 ***
## PopulationGI 0.60921 0.03063 57.25611 19.89 <2e-16 ***
## PopulationKA 0.72271 0.02674 39.22913 27.03 <2e-16 ***
## PopulationMA 0.64415 0.02663 44.78497 24.19 <2e-16 ***
## PopulationMU 0.72064 0.02668 38.85506 27.01 <2e-16 ***
## PopulationRE 0.64691 0.02978 53.90050 21.73 <2e-16 ***
## PopulationUM 0.71452 0.02805 45.74511 25.47 <2e-16 ***
## PopulationVA 0.63614 0.02668 38.85506 23.84 <2e-16 ***
## PopulationYE 0.51092 0.02668 38.85506 19.15 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.034
## PopulatinKA 0.039 0.037
## PopulatinMA 0.038 0.035 0.041
## PopulatinMU 0.039 0.037 0.043 0.041
## PopulatinRE 0.035 0.035 0.038 0.036 0.039
## PopulatinUM 0.037 0.035 0.041 0.039 0.041 0.037
## PopulatinVA 0.039 0.037 0.043 0.041 0.043 0.039 0.041
## PopulatinYE 0.039 0.037 0.043 0.041 0.043 0.039 0.041 0.043
model_means_Via_Grath <- emmeans(object = Via_lmer_Grath, specs = ~ Population)
model_means_Via_Grath_cld <- cld(object = model_means_Via_Grath, adjust = "Tukey", Letters = letters, alpha = 0.05) %>% as.data.frame %>% mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))) %>% arrange(Population) %>% dplyr::rename(cld = .group)
## Note: adjust = "tukey" was changed to "sidak"
## because "tukey" is only appropriate for one set of pairwise comparisons
anova(Via_lmer_Grath)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 30.247 10.082 3 27.279 628.46 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(Via_lmer_Grath)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ProportionEggtoAdultSurvival ~ -1 + Population + (1 | Line:Population)
## Data: d_Via[d_Via$Supervisor.PI == "Grath", ]
##
## REML criterion at convergence: -155.6
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.14211 -0.56745 0.04161 0.55412 2.60033
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 0.003394 0.05826
## Residual 0.016043 0.12666
## Number of obs: 147, groups: Line:Population, 30
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 0.69027 0.02612 28.41694 26.42 <2e-16 ***
## PopulationMU 0.61603 0.02569 26.74651 23.98 <2e-16 ***
## PopulationRE 0.63583 0.02569 26.74651 24.75 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltMU
## PopulatinMU 0.000
## PopulatinRE 0.000 0.000
model_means_Via_Hoedjes <- emmeans(object = Via_lmer_Hoedjes, specs = ~ Population)
model_means_Via_Hoedjes_cld <- cld(object = model_means_Via_Hoedjes, adjust = "Tukey", Letters = letters, alpha = 0.05) %>% as.data.frame %>% mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))) %>% arrange(Population) %>% dplyr::rename(cld = .group)
## Note: adjust = "tukey" was changed to "sidak"
## because "tukey" is only appropriate for one set of pairwise comparisons
anova(Via_lmer_Hoedjes)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 38.302 4.2558 9 158 595.36 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(Via_lmer_Hoedjes)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula:
## ProportionEggtoAdultSurvival ~ -1 + Population + (1 | Line:Population) +
## (1 | Batch)
## Data: d_Via[d_Via$Supervisor.PI == "Hoedjes", ]
##
## REML criterion at convergence: -712.5
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.7848 -0.5126 -0.0026 0.5498 2.7446
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 1.219e-02 1.104e-01
## Batch (Intercept) 2.196e-12 1.482e-06
## Residual 7.148e-03 8.455e-02
## Number of obs: 501, groups: Line:Population, 167; Batch, 4
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 0.77450 0.02699 157.99983 28.69 <2e-16 ***
## PopulationGI 0.60267 0.03117 157.99983 19.34 <2e-16 ***
## PopulationKA 0.71817 0.02699 157.99983 26.61 <2e-16 ***
## PopulationMA 0.70850 0.02699 157.99983 26.25 <2e-16 ***
## PopulationMU 0.73950 0.02699 157.99983 27.40 <2e-16 ***
## PopulationRE 0.62333 0.03117 157.99983 20.00 <2e-16 ***
## PopulationUM 0.68490 0.02928 157.99983 23.39 <2e-16 ***
## PopulationVA 0.68083 0.02699 157.99983 25.22 <2e-16 ***
## PopulationYE 0.55967 0.02699 157.99983 20.73 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.000
## PopulatinKA 0.000 0.000
## PopulatinMA 0.000 0.000 0.000
## PopulatinMU 0.000 0.000 0.000 0.000
## PopulatinRE 0.000 0.000 0.000 0.000 0.000
## PopulatinUM 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinVA 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinYE 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## optimizer (nloptwrap) convergence code: 0 (OK)
## boundary (singular) fit: see ?isSingular
model_means_Via_Schmidt <- emmeans(object = Via_lm_Schmidt, specs = ~ Population)
model_means_Via_Schmidt_cld <- cld(object = model_means_Via_Schmidt, adjust = "Tukey", Letters = letters, alpha = 0.05) %>% as.data.frame %>% mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))) %>% arrange(Population) %>% dplyr::rename(cld = .group)
## Note: adjust = "tukey" was changed to "sidak"
## because "tukey" is only appropriate for one set of pairwise comparisons
anova(Via_lm_Schmidt) #lm()` is used only for Schmidt Lab's viability data, as only one vial per line was phenotyped
## Analysis of Variance Table
##
## Response: ProportionEggtoAdultSurvival
## Df Sum Sq Mean Sq F value Pr(>F)
## Population 9 62.234 6.9148 140 < 2.2e-16 ***
## Residuals 153 7.557 0.0494
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(Via_lm_Schmidt)
##
## Call:
## lm(formula = ProportionEggtoAdultSurvival ~ -1 + Population,
## data = d_Via[d_Via$Supervisor.PI == "Schmidt", ])
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.48129 -0.19237 0.02616 0.16173 0.51871
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PopulationAK 0.62516 0.04970 12.580 < 2e-16 ***
## PopulationGI 0.48129 0.05738 8.387 3.06e-14 ***
## PopulationKA 0.76034 0.04970 15.300 < 2e-16 ***
## PopulationMA 0.63263 0.05238 12.077 < 2e-16 ***
## PopulationMU 0.57261 0.04970 11.522 < 2e-16 ***
## PopulationRE 0.62982 0.05738 10.976 < 2e-16 ***
## PopulationUM 0.71066 0.05940 11.965 < 2e-16 ***
## PopulationVA 0.58372 0.04970 11.746 < 2e-16 ***
## PopulationYE 0.53773 0.04970 10.821 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2222 on 153 degrees of freedom
## Multiple R-squared: 0.8917, Adjusted R-squared: 0.8853
## F-statistic: 140 on 9 and 153 DF, p-value: < 2.2e-16
p_Via_pop_Schmidt <- ggplot(data = (subset(d_Via,Supervisor.PI=='Schmidt')), aes(x=Population_Lat, y=ProportionEggtoAdultSurvival, fill=Population)) +geom_boxplot(outlier.shape = NA, notch=FALSE) + labs(title="p_Via_pop_Schmidt", x="Population", y = "ProportionEggtoAdultSurvival") + ylim(c(min_Via, max_Via))+ geom_text(data = model_means_Via_Schmidt_cld, aes(x = Population, label = cld), y = 1, vjust = 1) + droseu_theme
p_Via_pop_Schmidt
model_means_Via_StamenkovicRadak <- emmeans(object = Via_lmer_StamenkovicRadak, specs = ~ Population)
model_means_Via_StamenkovicRadak_cld <- cld(object = model_means_Via_StamenkovicRadak, adjust = "Tukey", Letters = letters, alpha = 0.05) %>% as.data.frame %>% mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))) %>% arrange(Population) %>% dplyr::rename(cld = .group)
## Note: adjust = "tukey" was changed to "sidak"
## because "tukey" is only appropriate for one set of pairwise comparisons
anova(Via_lmer_StamenkovicRadak)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 9.2366 1.0263 9 10.889 106.32 2.508e-09 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(Via_lmer_StamenkovicRadak)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula:
## ProportionEggtoAdultSurvival ~ -1 + Population + (1 | Line:Population) +
## (1 | Batch)
## Data: d_Via[d_Via$Supervisor.PI == "StamenkovicRadak", ]
##
## REML criterion at convergence: -589.4
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.6754 -0.5185 0.0052 0.5759 2.2517
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 0.013176 0.11479
## Batch (Intercept) 0.001207 0.03475
## Residual 0.009652 0.09825
## Number of obs: 501, groups: Line:Population, 167; Batch, 4
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 0.67693 0.03355 21.98005 20.18 1.13e-15 ***
## PopulationGI 0.60257 0.03968 38.88370 15.19 < 2e-16 ***
## PopulationKA 0.64900 0.03349 21.95976 19.38 2.68e-15 ***
## PopulationMA 0.55659 0.03358 21.97873 16.58 6.59e-14 ***
## PopulationMU 0.70096 0.03351 21.96452 20.92 5.41e-16 ***
## PopulationRE 0.62603 0.03645 29.58016 17.17 < 2e-16 ***
## PopulationUM 0.58917 0.03484 25.27417 16.91 2.70e-15 ***
## PopulationVA 0.56078 0.03355 21.98090 16.71 5.55e-14 ***
## PopulationYE 0.49467 0.03349 21.95976 14.77 6.90e-13 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.230
## PopulatinKA 0.269 0.227
## PopulatinMA 0.272 0.228 0.268
## PopulatinMU 0.270 0.228 0.269 0.271
## PopulatinRE 0.247 0.207 0.247 0.248 0.248
## PopulatinUM 0.258 0.216 0.259 0.258 0.259 0.239
## PopulatinVA 0.271 0.232 0.269 0.270 0.270 0.246 0.257
## PopulatinYE 0.269 0.227 0.269 0.268 0.269 0.247 0.259 0.269
model_means_Via_Zwaan <- emmeans(object = Via_lmer_Zwaan, specs = ~ Population)
model_means_Via_Zwaan_cld <- cld(object = model_means_Via_Zwaan, adjust = "Tukey", Letters = letters, alpha = 0.05) %>% as.data.frame %>% mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))) %>% arrange(Population) %>% dplyr::rename(cld = .group)
## Note: adjust = "tukey" was changed to "sidak"
## because "tukey" is only appropriate for one set of pairwise comparisons
anova(Via_lmer_Zwaan)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 101.61 11.29 9 151.79 517.76 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(Via_lmer_Zwaan)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula:
## ProportionEggtoAdultSurvival ~ -1 + Population + (1 | Line:Population) +
## (1 | Batch)
## Data: d_Via[d_Via$Supervisor.PI == "Zwaan", ]
##
## REML criterion at convergence: -328.3
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.8665 -0.4405 0.1045 0.5674 2.7223
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 0.01052 0.1025
## Batch (Intercept) 0.00000 0.0000
## Residual 0.02180 0.1477
## Number of obs: 524, groups: Line:Population, 169; Batch, 2
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 0.75329 0.02961 148.12936 25.44 <2e-16 ***
## PopulationGI 0.64361 0.03423 147.09939 18.80 <2e-16 ***
## PopulationKA 0.76026 0.02982 150.93460 25.50 <2e-16 ***
## PopulationMA 0.71368 0.02986 152.29083 23.90 <2e-16 ***
## PopulationMU 0.70735 0.03034 158.56478 23.32 <2e-16 ***
## PopulationRE 0.64594 0.03288 144.24242 19.65 <2e-16 ***
## PopulationUM 0.77891 0.03133 149.71959 24.86 <2e-16 ***
## PopulationVA 0.73253 0.03027 157.97927 24.20 <2e-16 ***
## PopulationYE 0.52726 0.03020 158.64348 17.46 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.000
## PopulatinKA 0.000 0.000
## PopulatinMA 0.000 0.000 0.000
## PopulatinMU 0.000 0.000 0.000 0.000
## PopulatinRE 0.000 0.000 0.000 0.000 0.000
## PopulatinUM 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinVA 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinYE 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## optimizer (nloptwrap) convergence code: 0 (OK)
## boundary (singular) fit: see ?isSingular
p_Via_Zwaan
pdf(file="Viability/p_Via_Zwaan.pdf",width=8, height=5)
p_Via_Zwaan
invisible(dev.off())
p_Via_pop_Zwaan
pdf(file="Viability/p_Via_pop_Zwaan.pdf",width=8, height=5)
p_Via_pop_Zwaan
invisible(dev.off())
There are 3 populations and 29 isofemale lines that have been phenotyped across the labs. Please refer to tables named intersect_Trait_level (i.e. intersect_Via_pop) for details.
Via_fitted <- combineFitted(labs = c("Gibert", "Grath", "Hoedjes", "Schmidt", "StamenkovicRadak", "Zwaan"), sex = rep("NA", 6), models = list(Via_lmer_Gibert, Via_lmer_Grath, Via_lmer_Hoedjes, Via_lm_Schmidt, Via_lmer_StamenkovicRadak, Via_lmer_Zwaan))
p_Via_lab_cor <- function() scatterPlotMatrix(Via_fitted, sex = "NA")
p_Via_lab_cor()
pdf(file="Viability/p_Via_lab_cor.pdf", width=8, height=8)
p_Via_lab_cor()
invisible(dev.off())
dir.create(file.path("DevelopmentTime"), showWarnings = FALSE)
For a detailed description of tables, plots, linear models and outputs, please refer here
Schmidt Lab : Paul Schmidt
Reading data in R
d_DT_P <- read.csv("MasterSheets_Oct21_git/DTP_MasterSheet_Oct21.csv")
str(d_DT_P) #Factors need reformatting
## 'data.frame': 3391 obs. of 13 variables:
## $ Supervisor.PI : chr "Schmidt" "Schmidt" "Schmidt" "Schmidt" ...
## $ Diet : chr "NS" "NS" "NS" "NS" ...
## $ Batch : int 1 1 1 1 1 1 1 1 1 1 ...
## $ Population : chr "VA" "VA" "VA" "VA" ...
## $ Line : chr "VA35" "VA35" "VA35" "VA35" ...
## $ ReplicateVialOld: int 1 1 1 1 1 1 1 1 1 1 ...
## $ ReplicateVial : chr "Schmidt_1_VA35_1" "Schmidt_1_VA35_1" "Schmidt_1_VA35_1" "Schmidt_1_VA35_1" ...
## $ Individual : int 1 2 3 4 5 6 7 8 9 10 ...
## $ DT_EggPupa : int 120 120 120 120 136 136 136 136 136 136 ...
## $ Country : chr "Russia" "Russia" "Russia" "Russia" ...
## $ Latitude : num 58 58 58 58 58 ...
## $ Longitude : num 33.2 33.2 33.2 33.2 33.2 ...
## $ Altitude : int 217 217 217 217 217 217 217 217 217 217 ...
d_DT_P$Supervisor.PI <- as.factor(d_DT_P$Supervisor.PI)
d_DT_P$Diet <- as.factor(d_DT_P$Diet)
d_DT_P$Batch <- as.factor(d_DT_P$Batch)
d_DT_P$Population_Lat <- factor(d_DT_P$Population, levels= c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))
d_DT_P$Population_Lon <- factor(d_DT_P$Population, levels= c("RE","GI","KA","MU","MA","AK","UM","YE","VA"))
d_DT_P$Population_Alt <- factor(d_DT_P$Population, levels= c("KA","AK","GI","RE","UM","VA","MU","MA","YE"))
d_DT_P$Line <- as.factor(d_DT_P$Line)
d_DT_P$ReplicateVial <- as.factor(d_DT_P$ReplicateVial)
d_DT_P$DT_EggPupa <- as.numeric(d_DT_P$DT_EggPupa)
str(d_DT_P) #They should be ok now.
## 'data.frame': 3391 obs. of 16 variables:
## $ Supervisor.PI : Factor w/ 1 level "Schmidt": 1 1 1 1 1 1 1 1 1 1 ...
## $ Diet : Factor w/ 1 level "NS": 1 1 1 1 1 1 1 1 1 1 ...
## $ Batch : Factor w/ 1 level "1": 1 1 1 1 1 1 1 1 1 1 ...
## $ Population : chr "VA" "VA" "VA" "VA" ...
## $ Line : Factor w/ 161 levels "AK1","AK10","AK11",..: 131 131 131 131 131 131 131 131 131 131 ...
## $ ReplicateVialOld: int 1 1 1 1 1 1 1 1 1 1 ...
## $ ReplicateVial : Factor w/ 161 levels "Schmidt_1_AK1_1",..: 131 131 131 131 131 131 131 131 131 131 ...
## $ Individual : int 1 2 3 4 5 6 7 8 9 10 ...
## $ DT_EggPupa : num 120 120 120 120 136 136 136 136 136 136 ...
## $ Country : chr "Russia" "Russia" "Russia" "Russia" ...
## $ Latitude : num 58 58 58 58 58 ...
## $ Longitude : num 33.2 33.2 33.2 33.2 33.2 ...
## $ Altitude : int 217 217 217 217 217 217 217 217 217 217 ...
## $ Population_Lat : Factor w/ 9 levels "YE","RE","GI",..: 8 8 8 8 8 8 8 8 8 8 ...
## $ Population_Lon : Factor w/ 9 levels "RE","GI","KA",..: 9 9 9 9 9 9 9 9 9 9 ...
## $ Population_Alt : Factor w/ 9 levels "KA","AK","GI",..: 6 6 6 6 6 6 6 6 6 6 ...
# Note that the trait has been phenotyped only in Schmidt lab and in one batch.
Descriptive statistics at the line level :
Descriptive statistics at the population level:
min_DT_P <- min(d_DT_P$DT_EggPupa)
max_DT_P <- max(d_DT_P$DT_EggPupa)
y-axis is scaled by the minimum (96) and maximum (192) values in the full data set.
DT_P_lmer <- lmer(DT_EggPupa ~ -1 + Population + (1|Population:Line), data = d_DT_P)
capture.output(summary(DT_P_lmer),file = "DevelopmentTime/DT_P_lmer_sum.txt")
capture.output(anova(DT_P_lmer),file = "DevelopmentTime/DT_P_F_lmer.txt")
capture.output(emmeans(DT_P_lmer, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "DevelopmentTime/DT_P_tk.txt")
model_means_DT_P_Schmidt <- emmeans(object = DT_P_lmer, specs = ~ Population)
## Note: D.f. calculations have been disabled because the number of observations exceeds 3000.
## To enable adjustments, add the argument 'pbkrtest.limit = 3391' (or larger)
## [or, globally, 'set emm_options(pbkrtest.limit = 3391)' or larger];
## but be warned that this may result in large computation time and memory use.
## Note: D.f. calculations have been disabled because the number of observations exceeds 3000.
## To enable adjustments, add the argument 'lmerTest.limit = 3391' (or larger)
## [or, globally, 'set emm_options(lmerTest.limit = 3391)' or larger];
## but be warned that this may result in large computation time and memory use.
model_means_DT_P_Schmidt_cld <- cld(object = model_means_DT_P_Schmidt, adjust = "Tukey", Letters = letters, alpha = 0.05) %>% as.data.frame %>% mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))) %>% arrange(Population) %>% dplyr::rename(cld = .group)
## Note: adjust = "tukey" was changed to "sidak"
## because "tukey" is only appropriate for one set of pairwise comparisons
anova(DT_P_lmer)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 2027827 225314 9 147.82 1892.9 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(DT_P_lmer)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: DT_EggPupa ~ -1 + Population + (1 | Population:Line)
## Data: d_DT_P
##
## REML criterion at convergence: 26303.9
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.9734 -0.6092 -0.0831 0.3912 4.7796
##
## Random effects:
## Groups Name Variance Std.Dev.
## Population:Line (Intercept) 158.4 12.59
## Residual 119.0 10.91
## Number of obs: 3391, groups: Population:Line, 161
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 127.502 2.867 143.578 44.48 <2e-16 ***
## PopulationGI 140.422 3.742 167.058 37.53 <2e-16 ***
## PopulationKA 127.292 2.883 145.919 44.16 <2e-16 ***
## PopulationMA 132.004 2.956 146.299 44.66 <2e-16 ***
## PopulationMU 129.730 2.865 143.161 45.29 <2e-16 ***
## PopulationRE 135.270 3.347 149.396 40.42 <2e-16 ***
## PopulationUM 131.161 3.299 141.662 39.76 <2e-16 ***
## PopulationVA 140.765 2.966 148.082 47.47 <2e-16 ***
## PopulationYE 135.200 2.890 148.107 46.77 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.000
## PopulatinKA 0.000 0.000
## PopulatinMA 0.000 0.000 0.000
## PopulatinMU 0.000 0.000 0.000 0.000
## PopulatinRE 0.000 0.000 0.000 0.000 0.000
## PopulatinUM 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinVA 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinYE 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
p_DT_P_Schmidt <- ggplot(data = (subset(d_DT_P,Supervisor.PI=='Schmidt')), aes(x=Population_Lat, y=DT_EggPupa, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_DT_P_Schmidt", x="Population", y = "DT_EggPupa") + ylim(c(min_DT_P, max_DT_P))+ geom_text(data = model_means_DT_P_Schmidt_cld, aes(x = Population, label = cld), y = 1, vjust = 1) + droseu_theme
p_DT_P_Schmidt
pdf(file="DevelopmentTime/p_DT_P_Schmidt.pdf",width=8, height=5)
p_DT_P_Schmidt
invisible(dev.off())
For a detailed description of tables, plots, linear models and outputs, please refer here
Gibert Lab : Cristina Vieira, Laurence Mouton, Natacha Kremer, Sonia Martinez, Patricia Gibert
Grath Lab : Ingo Müller, Sonja Grath
Hoedjes Lab : Hristina Kostic, Katja Hoedjes
Schmidt Lab : Ozan Kiratli, Yonatan Babore, Liam Forsythe, Paul Schmidt
Stamenkovic-Radak Lab : Marija Savic Veselinovic, Marija Tanaskovic, Aleksandra Patenkovic, Mihailo Jelic, Katarina Eric, Pavle Eric, Slobodan Davidovic, Marina Stamenkovic-Radak
Zwaan Lab : Joost van den Heuvel, Bas Zwaan
d_DT_A <- read.csv("MasterSheets_Oct21_git/DTA_MasterSheet_Oct21.csv")
str(d_DT_A) #Factors need reformatting
## 'data.frame': 57609 obs. of 14 variables:
## $ Supervisor.PI : chr "Gibert" "Gibert" "Gibert" "Gibert" ...
## $ Diet : chr "NS" "NS" "NS" "NS" ...
## $ Batch : int 1 1 1 1 1 1 1 1 1 1 ...
## $ Population : chr "AK" "AK" "AK" "AK" ...
## $ Line : chr "AK1" "AK1" "AK1" "AK1" ...
## $ Sex : chr "F" "F" "F" "F" ...
## $ ReplicateVialOld: int 1 1 1 1 1 1 1 1 1 1 ...
## $ ReplicateVial : chr "Gibert_1_AK1_1" "Gibert_1_AK1_1" "Gibert_1_AK1_1" "Gibert_1_AK1_1" ...
## $ Individual : int 1 2 3 4 5 6 7 8 9 10 ...
## $ DT_EggAdult : num 202 202 202 202 202 202 202 202 202 202 ...
## $ Country : chr "Finland" "Finland" "Finland" "Finland" ...
## $ Latitude : num 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 ...
## $ Longitude : num 23.5 23.5 23.5 23.5 23.5 ...
## $ Altitude : int 88 88 88 88 88 88 88 88 88 88 ...
d_DT_A$Supervisor.PI <- as.factor(d_DT_A$Supervisor.PI)
d_DT_A$Diet <- as.factor(d_DT_A$Diet)
d_DT_A$Batch <- as.factor(d_DT_A$Batch)
d_DT_A$Population_Lat <- factor(d_DT_A$Population, levels= c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))
d_DT_A$Population_Lon <- factor(d_DT_A$Population, levels= c("RE","GI","KA","MU","MA","AK","UM","YE","VA"))
d_DT_A$Population_Alt <- factor(d_DT_A$Population, levels= c("KA","AK","GI","RE","UM","VA","MU","MA","YE"))
d_DT_A$Line <- as.factor(d_DT_A$Line)
d_DT_A$Sex <- as.factor(d_DT_A$Sex)
d_DT_A$ReplicateVial <- as.factor(d_DT_A$ReplicateVial)
d_DT_A$DT_EggAdult <- as.numeric(d_DT_A$DT_EggAdult)
str(d_DT_A) #They should be ok now.
## 'data.frame': 57609 obs. of 17 variables:
## $ Supervisor.PI : Factor w/ 6 levels "Gibert","Grath",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Diet : Factor w/ 1 level "NS": 1 1 1 1 1 1 1 1 1 1 ...
## $ Batch : Factor w/ 4 levels "1","2","3","4": 1 1 1 1 1 1 1 1 1 1 ...
## $ Population : chr "AK" "AK" "AK" "AK" ...
## $ Line : Factor w/ 171 levels "AK1","AK10","AK11",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Sex : Factor w/ 2 levels "F","M": 1 1 1 1 1 1 1 1 1 1 ...
## $ ReplicateVialOld: int 1 1 1 1 1 1 1 1 1 1 ...
## $ ReplicateVial : Factor w/ 2300 levels "Gibert_1_AK1_1",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Individual : int 1 2 3 4 5 6 7 8 9 10 ...
## $ DT_EggAdult : num 202 202 202 202 202 202 202 202 202 202 ...
## $ Country : chr "Finland" "Finland" "Finland" "Finland" ...
## $ Latitude : num 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 ...
## $ Longitude : num 23.5 23.5 23.5 23.5 23.5 ...
## $ Altitude : int 88 88 88 88 88 88 88 88 88 88 ...
## $ Population_Lat : Factor w/ 9 levels "YE","RE","GI",..: 9 9 9 9 9 9 9 9 9 9 ...
## $ Population_Lon : Factor w/ 9 levels "RE","GI","KA",..: 6 6 6 6 6 6 6 6 6 6 ...
## $ Population_Alt : Factor w/ 9 levels "KA","AK","GI",..: 2 2 2 2 2 2 2 2 2 2 ...
#Create data sheets for females (d_DT_A_F) and males (d_DT_A_M), by sorting at sex level.
d_DT_A_F <-subset(d_DT_A,Sex=='F')
d_DT_A_M <-subset(d_DT_A,Sex=='M')
Descriptive statistics at the line level, with batch information :
Descriptive statistics at the line level, without batch information :
Descriptive statistics at the population level, with batch information :
Descriptive statistics at the population level, without batch information :
min_DT_A <- min(d_DT_A$DT_EggAdult)
max_DT_A <- max(d_DT_A$DT_EggAdult)
y-axis is scaled by the minimum (150) and maximum (394) values in the full data set.
p_DT_A_F_all <- ggplot(data = d_DT_A_F, aes(x=Population_Lat, y=DT_EggAdult, fill=Supervisor.PI)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_DT_A_F_all", x="Population", y = "DW_micrograms") + ylim(c(min_DT_A, max_DT_A))+ droseu_theme
## quartz_off_screen
## 2
p_DT_A_M_all <- ggplot(data = d_DT_A_M, aes(x=Population_Lat, y=DT_EggAdult, fill=Supervisor.PI)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_DT_A_M_all", x="Population", y = "DW_micrograms") + ylim(c(min_DT_A, max_DT_A))+ droseu_theme
## quartz_off_screen
## 2
DT_A_F_lmer_Gibert <- lmer(DT_EggAdult ~ -1 + Population + (1|Line:Population) + (1|Batch) + (1|ReplicateVial : Line), data = d_DT_A_F[d_DT_A_F$Supervisor.PI == "Gibert",])
capture.output(summary(DT_A_F_lmer_Gibert),file = "DevelopmentTime/DT_A_F_lmer_Gibert_sum.txt")
capture.output(anova(DT_A_F_lmer_Gibert),file = "DevelopmentTime/DT_A_F_lmer_Gibert.txt")
capture.output(emmeans(DT_A_F_lmer_Gibert, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"), file = "DevelopmentTime/DT_A_F_lmer_Gibert_tk.txt")
model_means_DT_A_F_Gibert <- emmeans(object = DT_A_F_lmer_Gibert, specs = ~ Population)
## Note: D.f. calculations have been disabled because the number of observations exceeds 3000.
## To enable adjustments, add the argument 'pbkrtest.limit = 6817' (or larger)
## [or, globally, 'set emm_options(pbkrtest.limit = 6817)' or larger];
## but be warned that this may result in large computation time and memory use.
## Note: D.f. calculations have been disabled because the number of observations exceeds 3000.
## To enable adjustments, add the argument 'lmerTest.limit = 6817' (or larger)
## [or, globally, 'set emm_options(lmerTest.limit = 6817)' or larger];
## but be warned that this may result in large computation time and memory use.
model_means_DT_A_F_Gibert_cld <- cld(object = model_means_DT_A_F_Gibert, adjust = "Tukey", Letters = letters, alpha = 0.05) %>% as.data.frame %>% mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))) %>% arrange(Population) %>% dplyr::rename(cld = .group)
## Note: adjust = "tukey" was changed to "sidak"
## because "tukey" is only appropriate for one set of pairwise comparisons
anova(DT_A_F_lmer_Gibert)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 5881228 653470 9 2 6961.1 0.0001436 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(DT_A_F_lmer_Gibert)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: DT_EggAdult ~ -1 + Population + (1 | Line:Population) + (1 |
## Batch) + (1 | ReplicateVial:Line)
## Data: d_DT_A_F[d_DT_A_F$Supervisor.PI == "Gibert", ]
##
## REML criterion at convergence: 50925
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.4211 -0.5914 -0.1334 0.4381 5.9468
##
## Random effects:
## Groups Name Variance Std.Dev.
## ReplicateVial:Line (Intercept) 4.727 2.174
## Line:Population (Intercept) 36.111 6.009
## Batch (Intercept) 1.175 1.084
## Residual 93.874 9.689
## Number of obs: 6817, groups:
## ReplicateVial:Line, 531; Line:Population, 169; Batch, 3
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 222.380 1.571 19.336 141.6 <2e-16 ***
## PopulationGI 226.716 1.810 23.726 125.3 <2e-16 ***
## PopulationKA 223.358 1.604 15.418 139.3 <2e-16 ***
## PopulationMA 222.090 1.608 15.561 138.1 <2e-16 ***
## PopulationMU 223.687 1.603 15.387 139.6 <2e-16 ***
## PopulationRE 227.852 1.771 22.073 128.7 <2e-16 ***
## PopulationUM 225.486 1.670 17.868 135.0 <2e-16 ***
## PopulationVA 223.889 1.610 15.644 139.1 <2e-16 ***
## PopulationYE 217.802 1.630 16.455 133.6 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.183
## PopulatinKA 0.206 0.197
## PopulatinMA 0.205 0.196 0.222
## PopulatinMU 0.206 0.197 0.223 0.223
## PopulatinRE 0.187 0.180 0.201 0.200 0.202
## PopulatinUM 0.197 0.189 0.214 0.214 0.214 0.193
## PopulatinVA 0.205 0.196 0.222 0.222 0.222 0.201 0.213
## PopulatinYE 0.202 0.194 0.219 0.219 0.219 0.198 0.211 0.219
DT_A_M_lmer_Gibert <- lmer(DT_EggAdult ~ -1 + Population + (1|Line:Population) + (1|Batch) + (1|ReplicateVial : Line), data = d_DT_A_M[d_DT_A_M$Supervisor.PI == "Gibert",])
capture.output(summary(DT_A_M_lmer_Gibert),file = "DevelopmentTime/DT_A_M_lmer_Gibert_sum.txt")
capture.output(anova(DT_A_M_lmer_Gibert),file = "DevelopmentTime/DT_A_M_lmer_Gibert.txt")
capture.output(emmeans(DT_A_M_lmer_Gibert, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "DevelopmentTime/DT_A_M_lmer_Gibert_tk.txt")
model_means_DT_A_M_Gibert <- emmeans(object = DT_A_M_lmer_Gibert, specs = ~ Population)
## Note: D.f. calculations have been disabled because the number of observations exceeds 3000.
## To enable adjustments, add the argument 'pbkrtest.limit = 6566' (or larger)
## [or, globally, 'set emm_options(pbkrtest.limit = 6566)' or larger];
## but be warned that this may result in large computation time and memory use.
## Note: D.f. calculations have been disabled because the number of observations exceeds 3000.
## To enable adjustments, add the argument 'lmerTest.limit = 6566' (or larger)
## [or, globally, 'set emm_options(lmerTest.limit = 6566)' or larger];
## but be warned that this may result in large computation time and memory use.
model_means_DT_A_M_Gibert_cld <- cld(object = model_means_DT_A_M_Gibert, adjust = "Tukey", Letters = letters, alpha = 0.05) %>% as.data.frame %>% mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))) %>% arrange(Population) %>% dplyr::rename(cld = .group)
## Note: adjust = "tukey" was changed to "sidak"
## because "tukey" is only appropriate for one set of pairwise comparisons
anova(DT_A_M_lmer_Gibert)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 10876506 1208501 9 2 11334 8.823e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(DT_A_M_lmer_Gibert)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: DT_EggAdult ~ -1 + Population + (1 | Line:Population) + (1 |
## Batch) + (1 | ReplicateVial:Line)
## Data: d_DT_A_M[d_DT_A_M$Supervisor.PI == "Gibert", ]
##
## REML criterion at convergence: 49809.5
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.4032 -0.6057 -0.1597 0.4187 5.0802
##
## Random effects:
## Groups Name Variance Std.Dev.
## ReplicateVial:Line (Intercept) 3.6928 1.9217
## Line:Population (Intercept) 31.0297 5.5704
## Batch (Intercept) 0.6211 0.7881
## Residual 106.6292 10.3261
## Number of obs: 6566, groups:
## ReplicateVial:Line, 533; Line:Population, 169; Batch, 3
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 226.515 1.412 30.257 160.4 <2e-16 ***
## PopulationGI 231.876 1.634 36.517 141.9 <2e-16 ***
## PopulationKA 227.223 1.437 23.884 158.1 <2e-16 ***
## PopulationMA 225.300 1.445 24.338 156.0 <2e-16 ***
## PopulationMU 227.801 1.434 23.728 158.8 <2e-16 ***
## PopulationRE 228.584 1.583 33.036 144.4 <2e-16 ***
## PopulationUM 229.773 1.501 27.748 153.0 <2e-16 ***
## PopulationVA 228.383 1.441 24.170 158.5 <2e-16 ***
## PopulationYE 223.520 1.464 25.700 152.7 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.120
## PopulatinKA 0.136 0.130
## PopulatinMA 0.135 0.128 0.148
## PopulatinMU 0.136 0.130 0.148 0.148
## PopulatinRE 0.124 0.120 0.134 0.133 0.134
## PopulatinUM 0.130 0.124 0.142 0.141 0.142 0.128
## PopulatinVA 0.135 0.129 0.148 0.147 0.148 0.134 0.141
## PopulatinYE 0.133 0.127 0.145 0.145 0.146 0.132 0.139 0.145
p_DT_A_F_Gibert <- ggplot(data = (subset(d_DT_A_F,Supervisor.PI=='Gibert')), aes(x=Population_Lat, y=DT_EggAdult, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_DT_A_F_Gibert", x="Population", y = "DT_EggAdult") + ylim(c(min_DT_A, max_DT_A))+ droseu_theme
p_DT_A_F_Gibert
pdf(file="DevelopmentTime/p_DT_A_F_Gibert.pdf",width=8, height=5)
p_DT_A_F_Gibert
dev.off()
## quartz_off_screen
## 2
## quartz_off_screen
## 2
## quartz_off_screen
## 2
p_DT_A_M_pop_Gibert <- ggplot(data = (subset(d_DT_A_M,Supervisor.PI=='Gibert')), aes(x=Population_Lat, y=DT_EggAdult, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_DT_A_M_pop_Gibert", x="Population", y = "DT_EggAdult")+ ylim(c(min_DT_A, max_DT_A))+ geom_text(data = model_means_DT_A_M_Gibert_cld, aes(x = Population, label = cld), y = 1, vjust = 1) + droseu_theme
p_DT_A_M_pop_Gibert
pdf(file="DevelopmentTime/p_DT_A_M_pop_Gibert.pdf",width=8, height=5)
p_DT_A_M_pop_Gibert
dev.off()
## quartz_off_screen
## 2
DT_A_F_lmer_Grath <- lmer(DT_EggAdult ~ -1 + Population + (1|Line:Population), data = d_DT_A_F[d_DT_A_F$Supervisor.PI == "Grath",])
capture.output(summary(DT_A_F_lmer_Grath),file = "DevelopmentTime/DT_A_F_lmer_Grath_sum.txt")
capture.output(anova(DT_A_F_lmer_Grath),file = "DevelopmentTime/DT_A_F_lmer_Grath.txt")
capture.output(emmeans(DT_A_F_lmer_Grath, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "DevelopmentTime/DT_A_F_lmer_Grath_tk.txt")
model_means_DT_A_F_Grath <- emmeans(object = DT_A_F_lmer_Grath, specs = ~ Population)
model_means_DT_A_F_Grath_cld <- cld(object = model_means_DT_A_F_Grath, adjust = "Tukey", Letters = letters, alpha = 0.05) %>% as.data.frame %>% mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))) %>% arrange(Population) %>% dplyr::rename(cld = .group)
## Note: adjust = "tukey" was changed to "sidak"
## because "tukey" is only appropriate for one set of pairwise comparisons
anova(DT_A_F_lmer_Grath)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 22182190 7394063 3 15.388 23537 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(DT_A_F_lmer_Grath)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: DT_EggAdult ~ -1 + Population + (1 | Line:Population)
## Data: d_DT_A_F[d_DT_A_F$Supervisor.PI == "Grath", ]
##
## REML criterion at convergence: 7659.8
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.0678 -0.7463 0.0894 0.5972 4.2158
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 22.4 4.732
## Residual 314.1 17.724
## Number of obs: 890, groups: Line:Population, 23
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 309.626 1.722 13.465 179.80 <2e-16 ***
## PopulationMU 305.631 1.756 14.520 174.06 <2e-16 ***
## PopulationRE 321.616 3.599 19.544 89.37 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltMU
## PopulatinMU 0.000
## PopulatinRE 0.000 0.000
DT_A_M_lmer_Grath <- lmer(DT_EggAdult ~ -1 + Population + (1|Line:Population), data = d_DT_A_M[d_DT_A_M$Supervisor.PI == "Grath",])
capture.output(summary(DT_A_M_lmer_Grath),file = "DevelopmentTime/DT_A_M_lmer_Grath_sum.txt")
capture.output(anova(DT_A_M_lmer_Grath),file = "DevelopmentTime/DT_A_M_lmer_Grath.txt")
capture.output(emmeans(DT_A_M_lmer_Grath, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "DevelopmentTime/DT_A_M_lmer_Grath_tk.txt")
model_means_DT_A_M_Grath <- emmeans(object = DT_A_M_lmer_Grath, specs = ~ Population)
model_means_DT_A_M_Grath_cld <- cld(object = model_means_DT_A_M_Grath, adjust = "Tukey", Letters = letters, alpha = 0.05) %>% as.data.frame %>% mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))) %>% arrange(Population) %>% dplyr::rename(cld = .group)
## Note: adjust = "tukey" was changed to "sidak"
## because "tukey" is only appropriate for one set of pairwise comparisons
anova(DT_A_M_lmer_Grath)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 12388975 4129658 3 18.297 13725 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(DT_A_M_lmer_Grath)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: DT_EggAdult ~ -1 + Population + (1 | Line:Population)
## Data: d_DT_A_M[d_DT_A_M$Supervisor.PI == "Grath", ]
##
## REML criterion at convergence: 7557.5
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.4732 -0.5678 -0.0897 0.6034 4.2694
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 47.61 6.90
## Residual 300.89 17.35
## Number of obs: 881, groups: Line:Population, 23
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 317.567 2.349 17.582 135.2 <2e-16 ***
## PopulationMU 312.148 2.360 17.944 132.2 <2e-16 ***
## PopulationRE 324.298 4.412 19.486 73.5 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltMU
## PopulatinMU 0.000
## PopulatinRE 0.000 0.000
pdf(file="DevelopmentTime/p_DT_A_F_Grath.pdf",width=8, height=5)
p_DT_A_F_Grath <- ggplot(data = (subset(d_DT_A_F,Supervisor.PI=='Grath')), aes(x=Population_Lat, y=DT_EggAdult, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_DT_A_F_Grath", x="Population", y = "DT_EggAdult")
p_DT_A_F_Grath + ylim(c(min_DT_A, max_DT_A))+ droseu_theme
dev.off()
## quartz_off_screen
## 2
p_DT_A_F_pop_Grath <- ggplot(data = (subset(d_DT_A_F,Supervisor.PI=='Grath')), aes(x=Population_Lat, y=DT_EggAdult, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_DT_A_F_pop_Grath", x="Population", y = "DT_EggAdult") + ylim(c(min_DT_A, max_DT_A))+ geom_text(data = model_means_DT_A_F_Grath_cld, aes(x = Population, label = cld), y = 1, vjust = 1) + droseu_theme
p_DT_A_F_pop_Grath
pdf(file="DevelopmentTime/p_DT_A_F_pop_Grath.pdf",width=8, height=5)
p_DT_A_F_pop_Grath
dev.off()
## quartz_off_screen
## 2
p_DT_A_M_Grath <- ggplot(data = (subset(d_DT_A_M,Supervisor.PI=='Grath')), aes(x=Population_Lat, y=DT_EggAdult, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_DT_A_M_Grath", x="Population", y = "DT_EggAdult") + ylim(c(min_DT_A, max_DT_A))+ droseu_theme
p_DT_A_M_Grath
pdf(file="DevelopmentTime/p_DT_A_M_Grath.pdf",width=8, height=5)
p_DT_A_M_Grath
dev.off()
## quartz_off_screen
## 2
p_DT_A_M_pop_Grath <- ggplot(data = (subset(d_DT_A_M,Supervisor.PI=='Grath')), aes(x=Population_Lat, y=DT_EggAdult, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_DT_A_M_pop_Grath", x="Population", y = "DT_EggAdult") + ylim(c(min_DT_A, max_DT_A))+ geom_text(data = model_means_DT_A_M_Grath_cld, aes(x = Population, label = cld), y = 1, vjust = 1) + droseu_theme
p_DT_A_M_pop_Grath
pdf(file="DevelopmentTime/p_DT_A_M_pop_Grath.pdf",width=8, height=5)
p_DT_A_M_pop_Grath
dev.off()
## quartz_off_screen
## 2
DT_A_F_lmer_Hoedjes <- lmer(DT_EggAdult ~ -1 + Population + (1|Line:Population) + (1|Batch) + (1|ReplicateVial : Line), data = d_DT_A_F[d_DT_A_F$Supervisor.PI == "Hoedjes",])
capture.output(summary(DT_A_F_lmer_Hoedjes),file = "DevelopmentTime/DT_A_F_lmer_Hoedjes_sum.txt")
capture.output(anova(DT_A_F_lmer_Hoedjes),file = "DevelopmentTime/DT_A_F_lmer_Hoedjes.txt")
capture.output(emmeans(DT_A_F_lmer_Hoedjes, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "DevelopmentTime/DT_A_F_lmer_Hoedjes_tk.txt")
model_means_DT_A_F_Hoedjes <- emmeans(object = DT_A_F_lmer_Hoedjes, specs = ~ Population)
## Note: D.f. calculations have been disabled because the number of observations exceeds 3000.
## To enable adjustments, add the argument 'pbkrtest.limit = 6939' (or larger)
## [or, globally, 'set emm_options(pbkrtest.limit = 6939)' or larger];
## but be warned that this may result in large computation time and memory use.
## Note: D.f. calculations have been disabled because the number of observations exceeds 3000.
## To enable adjustments, add the argument 'lmerTest.limit = 6939' (or larger)
## [or, globally, 'set emm_options(lmerTest.limit = 6939)' or larger];
## but be warned that this may result in large computation time and memory use.
model_means_DT_A_F_Hoedjes_cld <- cld(object = model_means_DT_A_F_Hoedjes, adjust = "Tukey", Letters = letters, alpha = 0.05) %>% as.data.frame %>% mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))) %>% arrange(Population) %>% dplyr::rename(cld = .group)
## Note: adjust = "tukey" was changed to "sidak"
## because "tukey" is only appropriate for one set of pairwise comparisons
anova(DT_A_F_lmer_Hoedjes)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 16156401 1795156 9 12.393 11812 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(DT_A_F_lmer_Hoedjes)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: DT_EggAdult ~ -1 + Population + (1 | Line:Population) + (1 |
## Batch) + (1 | ReplicateVial:Line)
## Data: d_DT_A_F[d_DT_A_F$Supervisor.PI == "Hoedjes", ]
##
## REML criterion at convergence: 54971.3
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.7059 -0.5552 -0.1930 0.3779 12.7479
##
## Random effects:
## Groups Name Variance Std.Dev.
## ReplicateVial:Line (Intercept) 4.685 2.164
## Line:Population (Intercept) 21.642 4.652
## Batch (Intercept) 1.381 1.175
## Residual 151.975 12.328
## Number of obs: 6939, groups:
## ReplicateVial:Line, 501; Line:Population, 167; Batch, 4
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 231.278 1.290 30.041 179.3 <2e-16 ***
## PopulationGI 237.944 1.486 47.280 160.1 <2e-16 ***
## PopulationKA 231.098 1.298 30.799 178.1 <2e-16 ***
## PopulationMA 233.211 1.303 31.308 179.0 <2e-16 ***
## PopulationMU 229.501 1.296 30.621 177.1 <2e-16 ***
## PopulationRE 237.728 1.487 45.160 159.9 <2e-16 ***
## PopulationUM 232.195 1.398 38.781 166.2 <2e-16 ***
## PopulationVA 229.880 1.306 31.587 176.0 <2e-16 ***
## PopulationYE 233.177 1.322 33.122 176.4 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.180
## PopulatinKA 0.206 0.179
## PopulatinMA 0.205 0.178 0.204
## PopulatinMU 0.207 0.179 0.205 0.204
## PopulatinRE 0.180 0.165 0.179 0.178 0.179
## PopulatinUM 0.191 0.171 0.190 0.190 0.191 0.177
## PopulatinVA 0.205 0.178 0.204 0.203 0.204 0.178 0.189
## PopulatinYE 0.202 0.175 0.201 0.200 0.202 0.175 0.187 0.200
DT_A_M_lmer_Hoedjes <- lmer(DT_EggAdult ~ -1 + Population + (1|Line:Population) + (1|Batch) + (1|ReplicateVial : Line), data = d_DT_A_M[d_DT_A_M$Supervisor.PI == "Hoedjes",])
capture.output(summary(DT_A_M_lmer_Hoedjes),file = "DevelopmentTime/DT_A_M_lmer_Hoedjes_sum.txt")
capture.output(anova(DT_A_M_lmer_Hoedjes),file = "DevelopmentTime/DT_A_M_lmer_Hoedjes.txt")
capture.output(emmeans(DT_A_M_lmer_Hoedjes, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "DevelopmentTime/DT_A_M_lmer_Hoedjes_tk.txt")
model_means_DT_A_M_Hoedjes <- emmeans(object = DT_A_M_lmer_Hoedjes, specs = ~ Population)
## Note: D.f. calculations have been disabled because the number of observations exceeds 3000.
## To enable adjustments, add the argument 'pbkrtest.limit = 6649' (or larger)
## [or, globally, 'set emm_options(pbkrtest.limit = 6649)' or larger];
## but be warned that this may result in large computation time and memory use.
## Note: D.f. calculations have been disabled because the number of observations exceeds 3000.
## To enable adjustments, add the argument 'lmerTest.limit = 6649' (or larger)
## [or, globally, 'set emm_options(lmerTest.limit = 6649)' or larger];
## but be warned that this may result in large computation time and memory use.
model_means_DT_A_M_Hoedjes_cld <- cld(object = model_means_DT_A_M_Hoedjes, adjust = "Tukey", Letters = letters, alpha = 0.05) %>% as.data.frame %>% mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))) %>% arrange(Population) %>% dplyr::rename(cld = .group)
## Note: adjust = "tukey" was changed to "sidak"
## because "tukey" is only appropriate for one set of pairwise comparisons
anova(DT_A_M_lmer_Hoedjes)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 14164896 1573877 9 11.733 7669.4 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(DT_A_M_lmer_Hoedjes)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: DT_EggAdult ~ -1 + Population + (1 | Line:Population) + (1 |
## Batch) + (1 | ReplicateVial:Line)
## Data: d_DT_A_M[d_DT_A_M$Supervisor.PI == "Hoedjes", ]
##
## REML criterion at convergence: 54596.2
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -6.8700 -0.5946 -0.0822 0.3611 10.9394
##
## Random effects:
## Groups Name Variance Std.Dev.
## ReplicateVial:Line (Intercept) 3.107 1.763
## Line:Population (Intercept) 24.219 4.921
## Batch (Intercept) 2.565 1.602
## Residual 205.215 14.325
## Number of obs: 6649, groups:
## ReplicateVial:Line, 501; Line:Population, 167; Batch, 4
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 238.685 1.466 19.775 162.8 <2e-16 ***
## PopulationGI 244.647 1.656 30.261 147.8 <2e-16 ***
## PopulationKA 236.153 1.470 19.993 160.6 <2e-16 ***
## PopulationMA 239.367 1.465 19.701 163.4 <2e-16 ***
## PopulationMU 236.531 1.466 19.789 161.3 <2e-16 ***
## PopulationRE 244.438 1.667 30.219 146.6 <2e-16 ***
## PopulationUM 237.762 1.568 24.969 151.6 <2e-16 ***
## PopulationVA 235.826 1.473 20.143 160.1 <2e-16 ***
## PopulationYE 239.204 1.502 21.765 159.2 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.264
## PopulatinKA 0.298 0.263
## PopulatinMA 0.299 0.264 0.298
## PopulatinMU 0.298 0.264 0.297 0.299
## PopulatinRE 0.262 0.241 0.261 0.263 0.262
## PopulatinUM 0.279 0.252 0.278 0.279 0.279 0.256
## PopulatinVA 0.297 0.263 0.296 0.297 0.297 0.262 0.278
## PopulatinYE 0.291 0.257 0.290 0.291 0.291 0.255 0.272 0.290
p_DT_A_F_Hoedjes <- ggplot(data = (subset(d_DT_A_F,Supervisor.PI=='Hoedjes')), aes(x=Population_Lat, y=DT_EggAdult, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_DT_A_F_Hoedjes", x="Population", y = "DT_EggAdult")+ ylim(c(min_DT_A, max_DT_A))+ droseu_theme
## quartz_off_screen
## 2
p_DT_A_F_pop_Hoedjes <- ggplot(data = (subset(d_DT_A_F,Supervisor.PI=='Hoedjes')), aes(x=Population_Lat, y=DT_EggAdult, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_DT_A_F_pop_Hoedjes", x="Population", y = "DT_EggAdult") + ylim(c(min_DT_A, max_DT_A))+ geom_text(data = model_means_DT_A_F_Hoedjes_cld, aes(x = Population, label = cld), y = 1, vjust = 1) + droseu_theme
## quartz_off_screen
## 2
p_DT_A_M_Hoedjes <- ggplot(data = (subset(d_DT_A_M,Supervisor.PI=='Hoedjes')), aes(x=Population_Lat, y=DT_EggAdult, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_DT_A_M_Hoedjes", x="Population", y = "DT_EggAdult")+ ylim(c(min_DT_A, max_DT_A))+ droseu_theme
## quartz_off_screen
## 2
p_DT_A_M_pop_Hoedjes <- ggplot(data = (subset(d_DT_A_M,Supervisor.PI=='Hoedjes')), aes(x=Population_Lat, y=DT_EggAdult, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_DT_A_M_pop_Hoedjes", x="Population", y = "DT_EggAdult") + ylim(c(min_DT_A, max_DT_A))+ geom_text(data = model_means_DT_A_M_Hoedjes_cld, aes(x = Population, label = cld), y = 1, vjust = 1) + droseu_theme
## quartz_off_screen
## 2
DT_A_F_lmer_Schmidt <- lmer(DT_EggAdult ~ -1 + Population + (1|Line:Population), data = d_DT_A_F[d_DT_A_F$Supervisor.PI == "Schmidt",])
capture.output(summary(DT_A_F_lmer_Schmidt),file = "DevelopmentTime/DT_A_F_lmer_Schmidt_sum.txt")
capture.output(anova(DT_A_F_lmer_Schmidt),file = "DevelopmentTime/DT_A_F_lmer_Schmidt.txt")
capture.output(emmeans(DT_A_F_lmer_Schmidt, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "DevelopmentTime/DT_A_F_lmer_Schmidt_tk.txt")
model_means_DT_A_F_Schmidt <- emmeans(object = DT_A_F_lmer_Schmidt, specs = ~ Population)
model_means_DT_A_F_Schmidt_cld <- cld(object = model_means_DT_A_F_Schmidt, adjust = "Tukey", Letters = letters, alpha = 0.05) %>% as.data.frame %>% mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))) %>% arrange(Population) %>% dplyr::rename(cld = .group)
## Note: adjust = "tukey" was changed to "sidak"
## because "tukey" is only appropriate for one set of pairwise comparisons
anova(DT_A_F_lmer_Schmidt)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 4258902 473211 9 144.94 2183.1 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(DT_A_F_lmer_Schmidt)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: DT_EggAdult ~ -1 + Population + (1 | Line:Population)
## Data: d_DT_A_F[d_DT_A_F$Supervisor.PI == "Schmidt", ]
##
## REML criterion at convergence: 14067.6
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.5685 -0.4672 -0.0841 0.3244 9.1996
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 382.1 19.55
## Residual 216.8 14.72
## Number of obs: 1664, groups: Line:Population, 159
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 218.139 4.503 141.010 48.44 <2e-16 ***
## PopulationGI 226.606 6.229 154.876 36.38 <2e-16 ***
## PopulationKA 220.027 4.622 140.746 47.61 <2e-16 ***
## PopulationMA 224.372 4.649 143.674 48.27 <2e-16 ***
## PopulationMU 221.157 4.491 139.463 49.25 <2e-16 ***
## PopulationRE 230.050 5.299 149.276 43.41 <2e-16 ***
## PopulationUM 222.182 5.168 137.621 42.99 <2e-16 ***
## PopulationVA 245.627 4.587 149.719 53.55 <2e-16 ***
## PopulationYE 222.365 4.581 150.071 48.54 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.000
## PopulatinKA 0.000 0.000
## PopulatinMA 0.000 0.000 0.000
## PopulatinMU 0.000 0.000 0.000 0.000
## PopulatinRE 0.000 0.000 0.000 0.000 0.000
## PopulatinUM 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinVA 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinYE 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
DT_A_M_lmer_Schmidt <- lmer(DT_EggAdult ~ -1 + Population + (1|Line:Population), data = d_DT_A_M[d_DT_A_M$Supervisor.PI == "Schmidt",])
capture.output(summary(DT_A_M_lmer_Schmidt),file = "DevelopmentTime/DT_A_M_lmer_Schmidt_sum.txt")
capture.output(anova(DT_A_M_lmer_Schmidt),file = "DevelopmentTime/DT_A_M_lmer_Schmidt.txt")
capture.output(emmeans(DT_A_M_lmer_Schmidt, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "DevelopmentTime/DT_A_M_lmer_Schmidt_tk.txt")
model_means_DT_A_M_Schmidt <- emmeans(object = DT_A_M_lmer_Schmidt, specs = ~ Population)
model_means_DT_A_M_Schmidt_cld <- cld(object = model_means_DT_A_M_Schmidt, adjust = "Tukey", Letters = letters, alpha = 0.05) %>% as.data.frame %>% mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))) %>% arrange(Population) %>% dplyr::rename(cld = .group)
## Note: adjust = "tukey" was changed to "sidak"
## because "tukey" is only appropriate for one set of pairwise comparisons
anova(DT_A_M_lmer_Schmidt)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 5393416 599268 9 141.65 2017.7 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(DT_A_M_lmer_Schmidt)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: DT_EggAdult ~ -1 + Population + (1 | Line:Population)
## Data: d_DT_A_M[d_DT_A_M$Supervisor.PI == "Schmidt", ]
##
## REML criterion at convergence: 12831.8
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.8636 -0.4961 -0.1229 0.3065 7.0181
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 416.9 20.42
## Residual 297.0 17.23
## Number of obs: 1464, groups: Line:Population, 157
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 226.013 4.743 135.966 47.65 <2e-16 ***
## PopulationGI 243.117 6.598 150.387 36.85 <2e-16 ***
## PopulationKA 219.913 4.876 136.693 45.10 <2e-16 ***
## PopulationMA 228.741 4.931 141.233 46.39 <2e-16 ***
## PopulationMU 226.716 4.871 136.720 46.54 <2e-16 ***
## PopulationRE 231.651 5.636 149.746 41.10 <2e-16 ***
## PopulationUM 229.105 5.464 134.715 41.93 <2e-16 ***
## PopulationVA 250.048 4.932 142.913 50.70 <2e-16 ***
## PopulationYE 225.938 4.861 148.803 46.48 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.000
## PopulatinKA 0.000 0.000
## PopulatinMA 0.000 0.000 0.000
## PopulatinMU 0.000 0.000 0.000 0.000
## PopulatinRE 0.000 0.000 0.000 0.000 0.000
## PopulatinUM 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinVA 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinYE 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
p_DT_A_F_Schmidt <- ggplot(data = (subset(d_DT_A_F,Supervisor.PI=='Schmidt')), aes(x=Population_Lat, y=DT_EggAdult, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_DT_A_F_Schmidt", x="Population", y = "DT_EggAdult") + ylim(c(min_DT_A, max_DT_A))+ droseu_theme
p_DT_A_F_Schmidt
pdf(file="DevelopmentTime/p_DT_A_F_Schmidt.pdf",width=8, height=5)
p_DT_A_F_Schmidt
dev.off()
## quartz_off_screen
## 2
p_DT_A_F_pop_Schmidt <- ggplot(data = (subset(d_DT_A_F,Supervisor.PI=='Schmidt')), aes(x=Population_Lat, y=DT_EggAdult, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_DT_A_F_pop_Schmidt", x="Population", y = "DT_EggAdult") + ylim(c(min_DT_A, max_DT_A))+geom_text(data = model_means_DT_A_F_Schmidt_cld, aes(x = Population, label = cld), y = 1, vjust = 1) + droseu_theme
p_DT_A_F_pop_Schmidt
pdf(file="DevelopmentTime/p_DT_A_F_pop_Schmidt.pdf",width=8, height=5)
p_DT_A_F_pop_Schmidt
dev.off()
## quartz_off_screen
## 2
p_DT_A_M_Schmidt <- ggplot(data = (subset(d_DT_A_M,Supervisor.PI=='Schmidt')), aes(x=Population_Lat, y=DT_EggAdult, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_DT_A_M_Schmidt", x="Population", y = "DT_EggAdult") + ylim(c(min_DT_A, max_DT_A))+ droseu_theme
p_DT_A_M_Schmidt
pdf(file="DevelopmentTime/p_DT_A_M_Schmidt.pdf",width=8, height=5)
p_DT_A_M_Schmidt
dev.off()
## quartz_off_screen
## 2
p_DT_A_M_pop_Schmidt <- ggplot(data = (subset(d_DT_A_M,Supervisor.PI=='Schmidt')), aes(x=Population_Lat, y=DT_EggAdult, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_DT_A_M_pop_Schmidt", x="Population", y = "DT_EggAdult") + ylim(c(min_DT_A, max_DT_A))+geom_text(data = model_means_DT_A_M_Schmidt_cld, aes(x = Population, label = cld), y = 1, vjust = 1) + droseu_theme
p_DT_A_M_pop_Schmidt
pdf(file="DevelopmentTime/p_DT_A_M_pop_Schmidt.pdf",width=8, height=5)
p_DT_A_M_pop_Schmidt
dev.off()
## quartz_off_screen
## 2
DT_A_F_lmer_StamenkovicRadak <- lmer(DT_EggAdult ~ -1 + Population + (1|Line:Population)+ (1|Batch) + (1|ReplicateVial : Line), data = d_DT_A_F[d_DT_A_F$Supervisor.PI == "StamenkovicRadak",])
capture.output(summary(DT_A_F_lmer_StamenkovicRadak),file = "DevelopmentTime/DT_A_F_lmer_StamenkovicRadak_sum.txt")
capture.output(anova(DT_A_F_lmer_StamenkovicRadak),file = "DevelopmentTime/DT_A_F_lmer_StamenkovicRadak.txt")
capture.output(emmeans(DT_A_F_lmer_StamenkovicRadak, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "DevelopmentTime/DT_A_F_lmer_StamenkovicRadak_tk.txt")
model_means_DT_A_F_StamenkovicRadak <- emmeans(object = DT_A_F_lmer_StamenkovicRadak, specs = ~ Population)
## Note: D.f. calculations have been disabled because the number of observations exceeds 3000.
## To enable adjustments, add the argument 'pbkrtest.limit = 6200' (or larger)
## [or, globally, 'set emm_options(pbkrtest.limit = 6200)' or larger];
## but be warned that this may result in large computation time and memory use.
## Note: D.f. calculations have been disabled because the number of observations exceeds 3000.
## To enable adjustments, add the argument 'lmerTest.limit = 6200' (or larger)
## [or, globally, 'set emm_options(lmerTest.limit = 6200)' or larger];
## but be warned that this may result in large computation time and memory use.
model_means_DT_A_F_StamenkovicRadak_cld <- cld(object = model_means_DT_A_F_StamenkovicRadak, adjust = "Tukey", Letters = letters, alpha = 0.05) %>% as.data.frame %>% mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))) %>% arrange(Population) %>% dplyr::rename(cld = .group)
## Note: adjust = "tukey" was changed to "sidak"
## because "tukey" is only appropriate for one set of pairwise comparisons
anova(DT_A_F_lmer_StamenkovicRadak)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 1580329 175592 9 10.415 574.67 8.483e-13 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(DT_A_F_lmer_StamenkovicRadak)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: DT_EggAdult ~ -1 + Population + (1 | Line:Population) + (1 |
## Batch) + (1 | ReplicateVial:Line)
## Data: d_DT_A_F[d_DT_A_F$Supervisor.PI == "StamenkovicRadak", ]
##
## REML criterion at convergence: 54203.3
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.5991 -0.5815 -0.1328 0.3761 6.5733
##
## Random effects:
## Groups Name Variance Std.Dev.
## ReplicateVial:Line (Intercept) 148.74 12.196
## Line:Population (Intercept) 175.07 13.231
## Batch (Intercept) 40.54 6.367
## Residual 305.55 17.480
## Number of obs: 6200, groups:
## ReplicateVial:Line, 494; Line:Population, 165; Batch, 4
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 237.623 4.734 10.934 50.19 2.80e-14 ***
## PopulationGI 245.089 5.318 16.968 46.08 < 2e-16 ***
## PopulationKA 229.151 4.666 10.342 49.12 1.35e-13 ***
## PopulationMA 246.250 4.693 10.558 52.47 4.13e-14 ***
## PopulationMU 237.559 4.666 10.341 50.91 9.37e-14 ***
## PopulationRE 255.347 4.976 13.236 51.32 < 2e-16 ***
## PopulationUM 252.917 4.816 11.692 52.52 3.01e-15 ***
## PopulationVA 251.781 4.750 11.062 53.01 1.15e-14 ***
## PopulationYE 240.080 4.692 10.574 51.17 5.18e-14 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.404
## PopulatinKA 0.459 0.408
## PopulatinMA 0.459 0.407 0.463
## PopulatinMU 0.460 0.409 0.466 0.465
## PopulatinRE 0.430 0.381 0.437 0.435 0.437
## PopulatinUM 0.444 0.394 0.451 0.449 0.451 0.424
## PopulatinVA 0.453 0.405 0.457 0.458 0.459 0.429 0.442
## PopulatinYE 0.456 0.406 0.463 0.460 0.463 0.434 0.448 0.455
DT_A_M_lmer_StamenkovicRadak <- lmer(DT_EggAdult ~ -1 + Population + (1|Line:Population) + (1|Batch) + (1|ReplicateVial : Line), data = d_DT_A_M[d_DT_A_M$Supervisor.PI == "StamenkovicRadak",])
capture.output(summary(DT_A_M_lmer_StamenkovicRadak),file = "DevelopmentTime/DT_A_M_lmer_StamenkovicRadak_sum.txt")
capture.output(anova(DT_A_M_lmer_StamenkovicRadak),file = "DevelopmentTime/DT_A_M_lmer_StamenkovicRadak.txt")
capture.output(emmeans(DT_A_M_lmer_StamenkovicRadak, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "DevelopmentTime/DT_A_M_lmer_StamenkovicRadak_tk.txt")
model_means_DT_A_M_StamenkovicRadak <- emmeans(object = DT_A_M_lmer_StamenkovicRadak, specs = ~ Population)
## Note: D.f. calculations have been disabled because the number of observations exceeds 3000.
## To enable adjustments, add the argument 'pbkrtest.limit = 5815' (or larger)
## [or, globally, 'set emm_options(pbkrtest.limit = 5815)' or larger];
## but be warned that this may result in large computation time and memory use.
## Note: D.f. calculations have been disabled because the number of observations exceeds 3000.
## To enable adjustments, add the argument 'lmerTest.limit = 5815' (or larger)
## [or, globally, 'set emm_options(lmerTest.limit = 5815)' or larger];
## but be warned that this may result in large computation time and memory use.
model_means_DT_A_M_StamenkovicRadak_cld <- cld(object = model_means_DT_A_M_StamenkovicRadak, adjust = "Tukey", Letters = letters, alpha = 0.05) %>% as.data.frame %>% mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))) %>% arrange(Population) %>% dplyr::rename(cld = .group)
## Note: adjust = "tukey" was changed to "sidak"
## because "tukey" is only appropriate for one set of pairwise comparisons
anova(DT_A_M_lmer_StamenkovicRadak)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 1933317 214813 9 10.511 652 3.489e-13 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(DT_A_M_lmer_StamenkovicRadak)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: DT_EggAdult ~ -1 + Population + (1 | Line:Population) + (1 |
## Batch) + (1 | ReplicateVial:Line)
## Data: d_DT_A_M[d_DT_A_M$Supervisor.PI == "StamenkovicRadak", ]
##
## REML criterion at convergence: 51282.9
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.9954 -0.5866 -0.1542 0.3744 6.6404
##
## Random effects:
## Groups Name Variance Std.Dev.
## ReplicateVial:Line (Intercept) 152.27 12.340
## Line:Population (Intercept) 162.25 12.738
## Batch (Intercept) 37.14 6.094
## Residual 329.47 18.151
## Number of obs: 5815, groups:
## ReplicateVial:Line, 494; Line:Population, 165; Batch, 4
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 242.718 4.584 11.349 52.95 6.00e-15 ***
## PopulationGI 251.724 5.164 17.775 48.75 < 2e-16 ***
## PopulationKA 234.825 4.519 10.752 51.96 2.92e-14 ***
## PopulationMA 250.468 4.538 10.905 55.19 1.07e-14 ***
## PopulationMU 244.124 4.518 10.734 54.03 2.01e-14 ***
## PopulationRE 259.635 4.823 13.793 53.83 < 2e-16 ***
## PopulationUM 257.083 4.678 12.289 54.96 4.46e-16 ***
## PopulationVA 259.384 4.599 11.483 56.40 2.14e-15 ***
## PopulationYE 246.043 4.544 10.989 54.15 1.08e-14 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.394
## PopulatinKA 0.448 0.398
## PopulatinMA 0.449 0.397 0.453
## PopulatinMU 0.450 0.399 0.455 0.455
## PopulatinRE 0.420 0.371 0.426 0.426 0.427
## PopulatinUM 0.433 0.383 0.439 0.437 0.439 0.412
## PopulatinVA 0.443 0.395 0.447 0.448 0.449 0.419 0.431
## PopulatinYE 0.446 0.396 0.452 0.450 0.452 0.424 0.437 0.444
p_DT_A_F_StamenkovicRadak <- ggplot(data = (subset(d_DT_A_F,Supervisor.PI=='StamenkovicRadak')), aes(x=Population_Lat, y=DT_EggAdult, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_DT_A_F_StamenkovicRadak", x="Population", y = "DT_EggAdult") + ylim(c(min_DT_A, max_DT_A))+ droseu_theme
p_DT_A_F_StamenkovicRadak
pdf(file="DevelopmentTime/p_DT_A_F_StamenkovicRadak.pdf",width=8, height=5)
p_DT_A_F_StamenkovicRadak
dev.off()
## quartz_off_screen
## 2
p_DT_A_F_pop_StamenkovicRadak <- ggplot(data = (subset(d_DT_A_F,Supervisor.PI=='StamenkovicRadak')), aes(x=Population_Lat, y=DT_EggAdult, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_DT_A_F_pop_StamenkovicRadak", x="Population", y = "DT_EggAdult") + ylim(c(min_DT_A, max_DT_A))+ geom_text(data = model_means_DT_A_F_StamenkovicRadak_cld, aes(x = Population, label = cld), y = 1, vjust = 1) + droseu_theme
p_DT_A_F_pop_StamenkovicRadak
pdf(file="DevelopmentTime/p_DT_A_F_pop_StamenkovicRadak.pdf",width=8, height=5)
p_DT_A_F_pop_StamenkovicRadak
dev.off()
## quartz_off_screen
## 2
p_DT_A_M_StamenkovicRadak <- ggplot(data = (subset(d_DT_A_M,Supervisor.PI=='StamenkovicRadak')), aes(x=Population_Lat, y=DT_EggAdult, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_DT_A_M_StamenkovicRadak", x="Population", y = "DT_EggAdult") + ylim(c(min_DT_A, max_DT_A))+ droseu_theme
p_DT_A_M_StamenkovicRadak
pdf(file="DevelopmentTime/p_DT_A_M_StamenkovicRadak.pdf",width=8, height=5)
p_DT_A_M_StamenkovicRadak
dev.off()
## quartz_off_screen
## 2
p_DT_A_M_pop_StamenkovicRadak <- ggplot(data = (subset(d_DT_A_M,Supervisor.PI=='StamenkovicRadak')), aes(x=Population_Lat, y=DT_EggAdult, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_DT_A_M_pop_StamenkovicRadak", x="Population", y = "DT_EggAdult")+ ylim(c(min_DT_A, max_DT_A))+ geom_text(data = model_means_DT_A_M_StamenkovicRadak_cld, aes(x = Population, label = cld), y = 1, vjust = 1) + droseu_theme
p_DT_A_M_pop_StamenkovicRadak
pdf(file="DevelopmentTime/p_DT_A_M_pop_StamenkovicRadak.pdf",width=8, height=5)
p_DT_A_M_pop_StamenkovicRadak
dev.off()
## quartz_off_screen
## 2
DT_A_F_lmer_Zwaan <- lmer(DT_EggAdult ~ -1 + Population + (1|Line:Population) + (1|Batch) + (1|ReplicateVial : Line), data = d_DT_A_F[d_DT_A_F$Supervisor.PI == "Zwaan",])
capture.output(summary(DT_A_F_lmer_Zwaan),file = "DevelopmentTime/DT_A_F_lmer_Zwaan_sum.txt")
capture.output(anova(DT_A_F_lmer_Zwaan),file = "DevelopmentTime/DT_A_F_lmer_Zwaan.txt")
capture.output(emmeans(DT_A_F_lmer_Zwaan, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "DevelopmentTime/DT_A_F_lmer_Zwaan_tk.txt")
model_means_DT_A_F_Zwaan <- emmeans(object = DT_A_F_lmer_Zwaan, specs = ~ Population)
## Note: D.f. calculations have been disabled because the number of observations exceeds 3000.
## To enable adjustments, add the argument 'pbkrtest.limit = 7330' (or larger)
## [or, globally, 'set emm_options(pbkrtest.limit = 7330)' or larger];
## but be warned that this may result in large computation time and memory use.
## Note: D.f. calculations have been disabled because the number of observations exceeds 3000.
## To enable adjustments, add the argument 'lmerTest.limit = 7330' (or larger)
## [or, globally, 'set emm_options(lmerTest.limit = 7330)' or larger];
## but be warned that this may result in large computation time and memory use.
model_means_DT_A_F_Zwaan_cld <- cld(object = model_means_DT_A_F_Zwaan, adjust = "Tukey", Letters = letters, alpha = 0.05) %>% as.data.frame %>% mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))) %>% arrange(Population) %>% dplyr::rename(cld = .group)
## Note: adjust = "tukey" was changed to "sidak"
## because "tukey" is only appropriate for one set of pairwise comparisons
anova(DT_A_F_lmer_Zwaan)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 1572099 174678 9 2 1565.5 0.0006385 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(DT_A_F_lmer_Zwaan)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: DT_EggAdult ~ -1 + Population + (1 | Line:Population) + (1 |
## Batch) + (1 | ReplicateVial:Line)
## Data: d_DT_A_F[d_DT_A_F$Supervisor.PI == "Zwaan", ]
##
## REML criterion at convergence: 55980.7
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.4229 -0.5259 -0.1848 0.2790 6.6947
##
## Random effects:
## Groups Name Variance Std.Dev.
## ReplicateVial:Line (Intercept) 8.246 2.872
## Line:Population (Intercept) 25.504 5.050
## Batch (Intercept) 6.706 2.590
## Residual 111.578 10.563
## Number of obs: 7330, groups:
## ReplicateVial:Line, 521; Line:Population, 169; Batch, 2
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 220.748 2.213 2.005 99.74 9.85e-05 ***
## PopulationGI 224.867 2.336 2.485 96.27 1.67e-05 ***
## PopulationKA 223.320 2.216 2.016 100.77 9.25e-05 ***
## PopulationMA 224.220 2.215 2.013 101.21 9.26e-05 ***
## PopulationMU 222.126 2.228 2.060 99.68 7.93e-05 ***
## PopulationRE 226.261 2.301 2.343 98.31 2.73e-05 ***
## PopulationUM 222.349 2.251 2.144 98.79 5.82e-05 ***
## PopulationVA 224.948 2.221 2.032 101.30 8.57e-05 ***
## PopulationYE 221.280 2.248 2.135 98.42 6.09e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.649
## PopulatinKA 0.684 0.648
## PopulatinMA 0.684 0.649 0.683
## PopulatinMU 0.680 0.645 0.679 0.679
## PopulatinRE 0.659 0.626 0.658 0.658 0.654
## PopulatinUM 0.673 0.639 0.672 0.673 0.669 0.648
## PopulatinVA 0.682 0.647 0.681 0.682 0.678 0.657 0.671
## PopulatinYE 0.674 0.640 0.673 0.674 0.670 0.649 0.663 0.672
DT_A_M_lmer_Zwaan <- lmer(DT_EggAdult ~ -1 + Population + (1|Line:Population) + (1|Batch) + (1|ReplicateVial : Line), data = d_DT_A_M[d_DT_A_M$Supervisor.PI == "Zwaan",])
capture.output(summary(DT_A_M_lmer_Zwaan),file = "DevelopmentTime/DT_A_M_lmer_Zwaan_sum.txt")
capture.output(anova(DT_A_M_lmer_Zwaan),file = "DevelopmentTime/DT_A_M_lmer_Zwaan.txt")
capture.output(emmeans(DT_A_M_lmer_Zwaan, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "DevelopmentTime/DT_A_M_lmer_Zwaan_tk.txt")
model_means_DT_A_M_Zwaan <- emmeans(object = DT_A_M_lmer_Zwaan, specs = ~ Population)
## Note: D.f. calculations have been disabled because the number of observations exceeds 3000.
## To enable adjustments, add the argument 'pbkrtest.limit = 6394' (or larger)
## [or, globally, 'set emm_options(pbkrtest.limit = 6394)' or larger];
## but be warned that this may result in large computation time and memory use.
## Note: D.f. calculations have been disabled because the number of observations exceeds 3000.
## To enable adjustments, add the argument 'lmerTest.limit = 6394' (or larger)
## [or, globally, 'set emm_options(lmerTest.limit = 6394)' or larger];
## but be warned that this may result in large computation time and memory use.
model_means_DT_A_M_Zwaan_cld <- cld(object = model_means_DT_A_M_Zwaan, adjust = "Tukey", Letters = letters, alpha = 0.05) %>% as.data.frame %>% mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))) %>% arrange(Population) %>% dplyr::rename(cld = .group)
## Note: adjust = "tukey" was changed to "sidak"
## because "tukey" is only appropriate for one set of pairwise comparisons
anova(DT_A_M_lmer_Zwaan)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 1363231 151470 9 2 1235.6 0.000809 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(DT_A_M_lmer_Zwaan)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: DT_EggAdult ~ -1 + Population + (1 | Line:Population) + (1 |
## Batch) + (1 | ReplicateVial:Line)
## Data: d_DT_A_M[d_DT_A_M$Supervisor.PI == "Zwaan", ]
##
## REML criterion at convergence: 49447.1
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.9922 -0.5259 -0.1942 0.2460 6.2037
##
## Random effects:
## Groups Name Variance Std.Dev.
## ReplicateVial:Line (Intercept) 7.491 2.737
## Line:Population (Intercept) 29.635 5.444
## Batch (Intercept) 8.828 2.971
## Residual 122.593 11.072
## Number of obs: 6394, groups:
## ReplicateVial:Line, 519; Line:Population, 169; Batch, 2
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 225.736 2.488 1.867 90.74 0.000204 ***
## PopulationGI 229.333 2.615 2.278 87.69 4.54e-05 ***
## PopulationKA 226.969 2.485 1.859 91.33 0.000207 ***
## PopulationMA 227.755 2.491 1.876 91.44 0.000194 ***
## PopulationMU 225.545 2.496 1.893 90.35 0.000185 ***
## PopulationRE 229.915 2.583 2.168 89.02 6.66e-05 ***
## PopulationUM 225.065 2.524 1.978 89.17 0.000137 ***
## PopulationVA 227.789 2.495 1.889 91.30 0.000185 ***
## PopulationYE 223.114 2.522 1.973 88.45 0.000142 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.679
## PopulatinKA 0.714 0.679
## PopulatinMA 0.712 0.678 0.713
## PopulatinMU 0.711 0.676 0.711 0.710
## PopulatinRE 0.687 0.655 0.688 0.686 0.685
## PopulatinUM 0.703 0.669 0.704 0.702 0.701 0.678
## PopulatinVA 0.711 0.677 0.712 0.710 0.709 0.685 0.701
## PopulatinYE 0.703 0.670 0.704 0.703 0.701 0.678 0.694 0.701
p_DT_A_F_Zwaan <- ggplot(data = (subset(d_DT_A_F,Supervisor.PI=='Zwaan')), aes(x=Population_Lat, y=DT_EggAdult, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_DT_A_F_Zwaan", x="Population", y = "DT_EggAdult")+ ylim(c(min_DT_A, max_DT_A))+ droseu_theme
p_DT_A_F_Zwaan
pdf(file="DevelopmentTime/p_DT_A_F_Zwaan.pdf",width=8, height=5)
p_DT_A_F_Zwaan
dev.off()
## quartz_off_screen
## 2
p_DT_A_F_pop_Zwaan <- ggplot(data = (subset(d_DT_A_F,Supervisor.PI=='Zwaan')), aes(x=Population_Lat, y=DT_EggAdult, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_DT_A_F_pop_Zwaan", x="Population", y = "DT_EggAdult")+ ylim(c(min_DT_A, max_DT_A))+geom_text(data = model_means_DT_A_F_Zwaan_cld, aes(x = Population, label = cld), y = 1, vjust = 1) + droseu_theme
p_DT_A_F_pop_Zwaan
pdf(file="DevelopmentTime/p_DT_A_F_pop_Zwaan.pdf",width=8, height=5)
p_DT_A_F_pop_Zwaan
dev.off()
## quartz_off_screen
## 2
p_DT_A_M_Zwaan <- ggplot(data = (subset(d_DT_A_M,Supervisor.PI=='Zwaan')), aes(x=Population_Lat, y=DT_EggAdult, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_DT_A_M_Zwaan", x="Population", y = "DT_EggAdult")+ ylim(c(min_DT_A, max_DT_A))+ droseu_theme
p_DT_A_M_Zwaan
pdf(file="DevelopmentTime/p_DT_A_M_Zwaan.pdf",width=8, height=5)
p_DT_A_M_Zwaan
dev.off()
## quartz_off_screen
## 2
p_DT_A_M_pop_Zwaan <- ggplot(data = (subset(d_DT_A_M,Supervisor.PI=='Zwaan')), aes(x=Population_Lat, y=DT_EggAdult, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_DT_A_M_pop_Zwaan", x="Population", y = "DT_EggAdult") + ylim(c(min_DT_A, max_DT_A))+geom_text(data = model_means_DT_A_M_Zwaan_cld, aes(x = Population, label = cld), y = 1, vjust = 1) + droseu_theme
p_DT_A_M_pop_Zwaan
pdf(file="DevelopmentTime/p_DT_A_M_pop_Zwaan.pdf",width=8, height=5)
p_DT_A_M_pop_Zwaan
dev.off
## function (which = dev.cur())
## {
## if (which == 1)
## stop("cannot shut down device 1 (the null device)")
## .External(C_devoff, as.integer(which))
## dev.cur()
## }
## <bytecode: 0x7f8af198e190>
## <environment: namespace:grDevices>
intersect_Line_DT_A <- Reduce(intersect, list(d_DT_A$Line[d_DT_A$Supervisor.PI == "Gibert"],
d_DT_A$Line[d_DT_A$Supervisor.PI == "Grath"],
d_DT_A$Line[d_DT_A$Supervisor.PI == "Hoedjes"],
d_DT_A$Line[d_DT_A$Supervisor.PI == "Schmidt"],
d_DT_A$Line[d_DT_A$Supervisor.PI == "StamenkovicRadak"],
d_DT_A$Line[d_DT_A$Supervisor.PI == "Zwaan"]))
write(intersect_Line_DT_A, file ="DevelopmentTime/intersect_Line_DT_A.txt", sep = "\t")
intersect_Pop_DT_A <- Reduce(intersect, list(d_DT_A$Population[d_DT_A$Supervisor.PI == "Gibert"],
d_DT_A$Population[d_DT_A$Supervisor.PI == "Grath"],
d_DT_A$Population[d_DT_A$Supervisor.PI == "Hoedjes"],
d_DT_A$Population[d_DT_A$Supervisor.PI == "Schmidt"],
d_DT_A$Population[d_DT_A$Supervisor.PI == "StamenkovicRadak"],
d_DT_A$Population[d_DT_A$Supervisor.PI == "Zwaan"]))
write(intersect_Pop_DT_A, file ="DevelopmentTime/intersect_Pop_DT_A.txt", sep = "\t")
There are 3 populations and 22 isofemale lines that have been phenotyped across the labs. Please refer to tables named intersect_Trait_level (i.e. intersect_Via_pop) for details.
DT_A_fitted <- combineFitted(labs = rep(c("Gibert", "Grath", "Hoedjes", "Schmidt", "StamenkovicRadak", "Zwaan"), 2), sex = rep(c("F", "M"), each = 6), models = list(DT_A_F_lmer_Gibert, DT_A_F_lmer_Grath, DT_A_F_lmer_Hoedjes, DT_A_F_lmer_Schmidt, DT_A_F_lmer_StamenkovicRadak, DT_A_F_lmer_Zwaan, DT_A_M_lmer_Gibert, DT_A_M_lmer_Grath, DT_A_M_lmer_Hoedjes, DT_A_M_lmer_Schmidt, DT_A_M_lmer_StamenkovicRadak, DT_A_M_lmer_Zwaan))
p_DT_A_F_lab_cor <- function() scatterPlotMatrix(DT_A_fitted, sex = "F")
p_DT_A_M_lab_cor <- function() scatterPlotMatrix(DT_A_fitted, sex = "M")
p_DT_A_F_lab_cor()
pdf(file="DevelopmentTime/p_DT_A_F_lab_cor.pdf",width=8, height=8)
p_DT_A_F_lab_cor()
invisible(dev.off())
p_DT_A_M_lab_cor()
pdf(file="DevelopmentTime/p_DT_A_M_lab_cor.pdf",width=8, height=8)
p_DT_A_M_lab_cor()
invisible(dev.off())
dir.create(file.path("DryWeight"), showWarnings = FALSE)
For a detailed description of tables, plots, linear models and outputs, please refer here
Colinet Lab : Sapho-Lou Marti , Hervé Colinet
Hoedjes Lab : Hristina Kostic, Katja Hoedjes
Onder Lab : Seda Coskun, Senel Selin Senkal, Dogus Can, Banu Sebnem Onder
Read data in R
d_DW <- read.csv("MasterSheets_Oct21_git/DW_MasterSheet_Oct21.csv")
str(d_DW)
## 'data.frame': 24161 obs. of 12 variables:
## $ Supervisor.PI: chr "Colinet" "Colinet" "Colinet" "Colinet" ...
## $ Diet : chr "NS" "NS" "NS" "NS" ...
## $ Batch : int 1 1 1 1 1 1 1 1 1 1 ...
## $ Population : chr "AK" "AK" "AK" "AK" ...
## $ Line : chr "AK1" "AK1" "AK1" "AK1" ...
## $ Sex : chr "F" "F" "F" "F" ...
## $ Individual : int 1 2 3 4 5 6 7 8 9 10 ...
## $ DW_micrograms: num 0.394 0.473 0.581 0.594 0.454 0.486 0.581 0.584 0.596 0.573 ...
## $ Country : chr "Finland" "Finland" "Finland" "Finland" ...
## $ Latitude : num 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 ...
## $ Longitude : num 23.5 23.5 23.5 23.5 23.5 ...
## $ Altitude : int 88 88 88 88 88 88 88 88 88 88 ...
d_DW$Supervisor.PI <- as.factor(d_DW$Supervisor.PI)
d_DW$Diet <- as.factor(d_DW$Diet)
d_DW$Batch <- as.factor(d_DW$Batch)
d_DW$Population <- as.factor(d_DW$Population)
d_DW$Population_Lat <- factor(d_DW$Population, levels= c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))
d_DW$Population_Lon <- factor(d_DW$Population, levels= c("RE","GI","KA","MU","MA","AK","UM","YE","VA"))
d_DW$Population_Alt <- factor(d_DW$Population, levels= c("KA","AK","GI","RE","UM","VA","MU","MA","YE"))
d_DW$Line <- as.factor(d_DW$Line)
d_DW$Sex <- as.factor(d_DW$Sex)
d_DW$DW_micrograms <- as.numeric(d_DW$DW_micrograms)
str(d_DW)
## 'data.frame': 24161 obs. of 15 variables:
## $ Supervisor.PI : Factor w/ 3 levels "Colinet","Hoedjes",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Diet : Factor w/ 1 level "NS": 1 1 1 1 1 1 1 1 1 1 ...
## $ Batch : Factor w/ 5 levels "1","2","3","4",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Population : Factor w/ 9 levels "AK","GI","KA",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Line : Factor w/ 170 levels "AK1","AK10","AK11",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Sex : Factor w/ 2 levels "F","M": 1 1 1 1 1 1 1 1 1 1 ...
## $ Individual : int 1 2 3 4 5 6 7 8 9 10 ...
## $ DW_micrograms : num 0.394 0.473 0.581 0.594 0.454 0.486 0.581 0.584 0.596 0.573 ...
## $ Country : chr "Finland" "Finland" "Finland" "Finland" ...
## $ Latitude : num 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 ...
## $ Longitude : num 23.5 23.5 23.5 23.5 23.5 ...
## $ Altitude : int 88 88 88 88 88 88 88 88 88 88 ...
## $ Population_Lat: Factor w/ 9 levels "YE","RE","GI",..: 9 9 9 9 9 9 9 9 9 9 ...
## $ Population_Lon: Factor w/ 9 levels "RE","GI","KA",..: 6 6 6 6 6 6 6 6 6 6 ...
## $ Population_Alt: Factor w/ 9 levels "KA","AK","GI",..: 2 2 2 2 2 2 2 2 2 2 ...
d_DW_F <-subset(d_DW,Sex=='F')
d_DW_M <-subset(d_DW,Sex=='M')
Descriptive statistics at the line level, with batch information :
Descriptive statistics at the line level, without batch information :
Descriptive statistics at the population level, with batch information :
Descriptive statistics at the population level, without batch information :
min_DW <- min(d_DW$DW_micrograms)
max_DW <- max(d_DW$DW_micrograms)
y-axis is scaled by the minimum (0.136) and maximum (0.73) values in the full data set.
pdf(file="DryWeight/p_DW_F_all.pdf",width=8, height=5)
p_DW_F_all <- ggplot(data = d_DW_F, aes(x=Population_Lat, y=DW_micrograms, fill=Supervisor.PI)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_DW_F_all", x="Population", y = "DW_micrograms")
p_DW_F_all + ylim(c(min_DW, max_DW))+ droseu_theme
dev.off()
## quartz_off_screen
## 2
pdf(file="DryWeight/p_DW_M_all.pdf",width=8, height=5)
p_DW_M_all <- ggplot(data = d_DW_M, aes(x=Population_Lat, y=DW_micrograms, fill=Supervisor.PI)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_DW_M_all", x="Population", y = "DW_micrograms")
p_DW_M_all + ylim(c(min_DW, max_DW))+ droseu_theme
dev.off()
## quartz_off_screen
## 2
DW_F_lmer_Colinet <- lmer(DW_micrograms ~ -1 + Population + (1|Population:Line) + (1|Batch), data = d_DW_F[d_DW_F$Supervisor.PI == "Colinet",])
capture.output(summary(DW_F_lmer_Colinet),file = "DryWeight/DW_F_lmer_Colinet_sum.txt")
capture.output(anova(DW_F_lmer_Colinet),file = "DryWeight/DW_F_lmer_Colinet.txt")
capture.output(emmeans(DW_F_lmer_Colinet, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "DryWeight/DW_F_lmer_Colinet_tk.txt")
model_means_DW_F_Colinet <- emmeans(object = DW_F_lmer_Colinet, specs = ~ Population)
## Note: D.f. calculations have been disabled because the number of observations exceeds 3000.
## To enable adjustments, add the argument 'pbkrtest.limit = 3982' (or larger)
## [or, globally, 'set emm_options(pbkrtest.limit = 3982)' or larger];
## but be warned that this may result in large computation time and memory use.
## Note: D.f. calculations have been disabled because the number of observations exceeds 3000.
## To enable adjustments, add the argument 'lmerTest.limit = 3982' (or larger)
## [or, globally, 'set emm_options(lmerTest.limit = 3982)' or larger];
## but be warned that this may result in large computation time and memory use.
model_means_DW_F_Colinet_cld <- cld(object = model_means_DW_F_Colinet, adjust = "Tukey", Letters = letters, alpha = 0.05) %>% as.data.frame %>% mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))) %>% arrange(Population) %>% dplyr::rename(cld = .group)
## Note: adjust = "tukey" was changed to "sidak"
## because "tukey" is only appropriate for one set of pairwise comparisons
anova(DW_F_lmer_Colinet)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 7.8449 0.87166 9 2 323.43 0.003086 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(DW_F_lmer_Colinet)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: DW_micrograms ~ -1 + Population + (1 | Population:Line) + (1 |
## Batch)
## Data: d_DW_F[d_DW_F$Supervisor.PI == "Colinet", ]
##
## REML criterion at convergence: -11771.4
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -4.2178 -0.6128 0.0273 0.6249 4.1344
##
## Random effects:
## Groups Name Variance Std.Dev.
## Population:Line (Intercept) 0.001328 0.03645
## Batch (Intercept) 0.000219 0.01480
## Residual 0.002695 0.05191
## Number of obs: 3982, groups: Population:Line, 166; Batch, 3
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 0.46881 0.01205 5.84387 38.89 2.79e-08 ***
## PopulationGI 0.47949 0.01328 8.25191 36.11 2.23e-10 ***
## PopulationKA 0.49849 0.01239 6.27649 40.23 8.20e-09 ***
## PopulationMA 0.49998 0.01220 6.13762 40.98 1.02e-08 ***
## PopulationMU 0.48458 0.01205 5.84387 40.20 2.30e-08 ***
## PopulationRE 0.51478 0.01328 8.24981 38.77 1.25e-10 ***
## PopulationUM 0.50102 0.01287 7.28302 38.94 1.01e-09 ***
## PopulationVA 0.49685 0.01239 6.27649 40.09 8.37e-09 ***
## PopulationYE 0.48099 0.01205 5.84480 39.90 2.40e-08 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.447
## PopulatinKA 0.479 0.490
## PopulatinMA 0.497 0.446 0.478
## PopulatinMU 0.504 0.447 0.479 0.497
## PopulatinRE 0.447 0.455 0.490 0.446 0.447
## PopulatinUM 0.462 0.471 0.509 0.460 0.462 0.471
## PopulatinVA 0.479 0.490 0.531 0.478 0.479 0.490 0.509
## PopulatinYE 0.504 0.447 0.479 0.497 0.504 0.447 0.462 0.479
DW_M_lmer_Colinet <- lmer(DW_micrograms ~ -1 + Population + (1|Population:Line) + (1|Batch), data = d_DW_M[d_DW_M$Supervisor.PI == "Colinet",])
## boundary (singular) fit: see ?isSingular
capture.output(summary(DW_M_lmer_Colinet),file = "DryWeight/DW_M_lmer_Colinet_sum.txt")
capture.output(anova(DW_M_lmer_Colinet),file = "DryWeight/DW_M_lmer_Colinet.txt")
capture.output(emmeans(DW_M_lmer_Colinet, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "DryWeight/DW_M_lmer_Colinet_tk.txt")
model_means_DW_M_Colinet <- emmeans(object = DW_M_lmer_Colinet, specs = ~ Population)
## Note: D.f. calculations have been disabled because the number of observations exceeds 3000.
## To enable adjustments, add the argument 'pbkrtest.limit = 3975' (or larger)
## [or, globally, 'set emm_options(pbkrtest.limit = 3975)' or larger];
## but be warned that this may result in large computation time and memory use.
## Note: D.f. calculations have been disabled because the number of observations exceeds 3000.
## To enable adjustments, add the argument 'lmerTest.limit = 3975' (or larger)
## [or, globally, 'set emm_options(lmerTest.limit = 3975)' or larger];
## but be warned that this may result in large computation time and memory use.
model_means_DW_M_Colinet_cld <- cld(object = model_means_DW_M_Colinet, adjust = "Tukey", Letters = letters, alpha = 0.05) %>% as.data.frame %>% mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))) %>% arrange(Population) %>% dplyr::rename(cld = .group)
## Note: adjust = "tukey" was changed to "sidak"
## because "tukey" is only appropriate for one set of pairwise comparisons
anova(DW_M_lmer_Colinet)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 22.773 2.5304 9 157.01 3533.8 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(DW_M_lmer_Colinet)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: DW_micrograms ~ -1 + Population + (1 | Population:Line) + (1 |
## Batch)
## Data: d_DW_M[d_DW_M$Supervisor.PI == "Colinet", ]
##
## REML criterion at convergence: -17014.2
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.6407 -0.5828 -0.0246 0.5790 7.4085
##
## Random effects:
## Groups Name Variance Std.Dev.
## Population:Line (Intercept) 0.0003446 0.01856
## Batch (Intercept) 0.0000000 0.00000
## Residual 0.0007161 0.02676
## Number of obs: 3975, groups: Population:Line, 166; Batch, 3
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 2.595e-01 4.327e-03 1.570e+02 59.97 <2e-16 ***
## PopulationGI 2.604e-01 4.999e-03 1.574e+02 52.09 <2e-16 ***
## PopulationKA 2.791e-01 4.327e-03 1.570e+02 64.51 <2e-16 ***
## PopulationMA 2.711e-01 4.439e-03 1.569e+02 61.08 <2e-16 ***
## PopulationMU 2.721e-01 4.327e-03 1.569e+02 62.89 <2e-16 ***
## PopulationRE 2.761e-01 4.996e-03 1.569e+02 55.26 <2e-16 ***
## PopulationUM 2.758e-01 4.693e-03 1.569e+02 58.78 <2e-16 ***
## PopulationVA 2.675e-01 4.327e-03 1.570e+02 61.83 <2e-16 ***
## PopulationYE 2.492e-01 4.327e-03 1.570e+02 57.59 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.000
## PopulatinKA 0.000 0.000
## PopulatinMA 0.000 0.000 0.000
## PopulatinMU 0.000 0.000 0.000 0.000
## PopulatinRE 0.000 0.000 0.000 0.000 0.000
## PopulatinUM 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinVA 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinYE 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## optimizer (nloptwrap) convergence code: 0 (OK)
## boundary (singular) fit: see ?isSingular
p_DW_F_Colinet <- ggplot(data = (subset(d_DW_F,Supervisor.PI=='Colinet')), aes(x=Population_Lat, y=DW_micrograms, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_DW_F_Colinet", x="Population", y = "DW_micrograms") + ylim(c(min_DW, max_DW))+ droseu_theme
## quartz_off_screen
## 2
p_DW_F_pop_Colinet <- ggplot(data = (subset(d_DW_F,Supervisor.PI=='Colinet')), aes(x=Population_Lat, y=DW_micrograms, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_DW_F_pop_Colinet", x="Population", y = "DW_micrograms") + ylim(c(min_DW, max_DW))+geom_text(data = model_means_DW_F_Colinet_cld, aes(x = Population, label = cld), y = 1, vjust = 1) + droseu_theme
## quartz_off_screen
## 2
p_DW_M_Colinet <- ggplot(data = (subset(d_DW_M,Supervisor.PI=='Colinet')), aes(x=Population_Lat, y=DW_micrograms, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_DW_M_Colinet", x="Population", y = "DW_micrograms") + ylim(c(min_DW, max_DW))+ droseu_theme
## quartz_off_screen
## 2
p_DW_M_pop_Colinet <- ggplot(data = (subset(d_DW_M,Supervisor.PI=='Colinet')), aes(x=Population_Lat, y=DW_micrograms, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_DW_M_pop_Colinet", x="Population", y = "DW_micrograms") + ylim(c(min_DW, max_DW))+geom_text(data = model_means_DW_M_Colinet_cld, aes(x = Population, label = cld), y = 1, vjust = 1) + droseu_theme
## quartz_off_screen
## 2
DW_F_lmer_Hoedjes <- lmer(DW_micrograms ~ -1 + Population + (1|Population:Line) + (1|Batch), data = d_DW_F[d_DW_F$Supervisor.PI == "Hoedjes",])
capture.output(summary(DW_F_lmer_Hoedjes),file = "DryWeight/DW_F_lmer_Hoedjes_sum.txt")
capture.output(anova(DW_F_lmer_Hoedjes),file = "DryWeight/DW_F_lmer_Hoedjes.txt")
capture.output(emmeans(DW_F_lmer_Hoedjes, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "DryWeight/DW_F_lmer_Hoedjes_tk.txt")
model_means_DW_F_Hoedjes <- emmeans(object = DW_F_lmer_Hoedjes, specs = ~ Population)
## Note: D.f. calculations have been disabled because the number of observations exceeds 3000.
## To enable adjustments, add the argument 'pbkrtest.limit = 4004' (or larger)
## [or, globally, 'set emm_options(pbkrtest.limit = 4004)' or larger];
## but be warned that this may result in large computation time and memory use.
## Note: D.f. calculations have been disabled because the number of observations exceeds 3000.
## To enable adjustments, add the argument 'lmerTest.limit = 4004' (or larger)
## [or, globally, 'set emm_options(lmerTest.limit = 4004)' or larger];
## but be warned that this may result in large computation time and memory use.
model_means_DW_F_Hoedjes_cld <- cld(object = model_means_DW_F_Hoedjes, adjust = "Tukey", Letters = letters, alpha = 0.05) %>% as.data.frame %>% mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))) %>% arrange(Population) %>% dplyr::rename(cld = .group)
## Note: adjust = "tukey" was changed to "sidak"
## because "tukey" is only appropriate for one set of pairwise comparisons
anova(DW_F_lmer_Hoedjes)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 16.301 1.8112 9 19.473 804.2 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(DW_F_lmer_Hoedjes)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: DW_micrograms ~ -1 + Population + (1 | Population:Line) + (1 |
## Batch)
## Data: d_DW_F[d_DW_F$Supervisor.PI == "Hoedjes", ]
##
## REML criterion at convergence: -12532.7
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -4.6857 -0.6210 -0.0043 0.6319 3.4401
##
## Random effects:
## Groups Name Variance Std.Dev.
## Population:Line (Intercept) 1.272e-03 0.035659
## Batch (Intercept) 8.069e-05 0.008983
## Residual 2.252e-03 0.047457
## Number of obs: 4004, groups: Population:Line, 167; Batch, 4
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 0.437373 0.009404 34.224775 46.51 <2e-16 ***
## PopulationGI 0.448305 0.010572 48.980304 42.41 <2e-16 ***
## PopulationKA 0.458818 0.009405 34.225455 48.78 <2e-16 ***
## PopulationMA 0.443136 0.009406 34.241181 47.11 <2e-16 ***
## PopulationMU 0.456749 0.009402 34.185580 48.58 <2e-16 ***
## PopulationRE 0.465470 0.010563 49.059236 44.06 <2e-16 ***
## PopulationUM 0.449962 0.010034 42.068161 44.84 <2e-16 ***
## PopulationVA 0.473101 0.009408 34.269319 50.29 <2e-16 ***
## PopulationYE 0.442165 0.009426 34.396102 46.91 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.203
## PopulatinKA 0.228 0.202
## PopulatinMA 0.228 0.203 0.228
## PopulatinMU 0.228 0.203 0.228 0.228
## PopulatinRE 0.203 0.182 0.203 0.203 0.203
## PopulatinUM 0.214 0.191 0.214 0.214 0.213 0.193
## PopulatinVA 0.228 0.203 0.228 0.228 0.228 0.203 0.214
## PopulatinYE 0.228 0.202 0.228 0.228 0.228 0.200 0.212 0.228
DW_M_lmer_Hoedjes <- lmer(DW_micrograms ~ -1 + Population + (1|Population:Line) + (1|Batch), data = d_DW_M[d_DW_M$Supervisor.PI == "Hoedjes",])
capture.output(summary(DW_M_lmer_Hoedjes),file = "DryWeight/DW_M_lmer_Hoedjes_sum.txt")
capture.output(anova(DW_M_lmer_Hoedjes),file = "DryWeight/DW_M_lmer_Hoedjes.txt")
capture.output(emmeans(DW_M_lmer_Hoedjes, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "DryWeight/DW_M_lmer_Hoedjes_tk.txt")
model_means_DW_M_Hoedjes <- emmeans(object = DW_M_lmer_Hoedjes, specs = ~ Population)
## Note: D.f. calculations have been disabled because the number of observations exceeds 3000.
## To enable adjustments, add the argument 'pbkrtest.limit = 3997' (or larger)
## [or, globally, 'set emm_options(pbkrtest.limit = 3997)' or larger];
## but be warned that this may result in large computation time and memory use.
## Note: D.f. calculations have been disabled because the number of observations exceeds 3000.
## To enable adjustments, add the argument 'lmerTest.limit = 3997' (or larger)
## [or, globally, 'set emm_options(lmerTest.limit = 3997)' or larger];
## but be warned that this may result in large computation time and memory use.
model_means_DW_M_Hoedjes_cld <- cld(object = model_means_DW_M_Hoedjes, adjust = "Tukey", Letters = letters, alpha = 0.05) %>% as.data.frame %>% mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))) %>% arrange(Population) %>% dplyr::rename(cld = .group)
## Note: adjust = "tukey" was changed to "sidak"
## because "tukey" is only appropriate for one set of pairwise comparisons
anova(DW_M_lmer_Hoedjes)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 2.2285 0.24762 9 21.575 367.04 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(DW_M_lmer_Hoedjes)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: DW_micrograms ~ -1 + Population + (1 | Population:Line) + (1 |
## Batch)
## Data: d_DW_M[d_DW_M$Supervisor.PI == "Hoedjes", ]
##
## REML criterion at convergence: -17309.3
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -4.1189 -0.6261 -0.0298 0.6056 5.1645
##
## Random effects:
## Groups Name Variance Std.Dev.
## Population:Line (Intercept) 3.883e-04 0.019704
## Batch (Intercept) 9.299e-05 0.009643
## Residual 6.746e-04 0.025974
## Number of obs: 3997, groups: Population:Line, 167; Batch, 5
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 0.263655 0.006342 14.534898 41.58 <2e-16 ***
## PopulationGI 0.265886 0.006861 19.489321 38.76 <2e-16 ***
## PopulationKA 0.274427 0.006340 14.522154 43.28 <2e-16 ***
## PopulationMA 0.266815 0.006330 14.457218 42.15 <2e-16 ***
## PopulationMU 0.269200 0.006342 14.534547 42.45 <2e-16 ***
## PopulationRE 0.269957 0.006885 19.684454 39.21 <2e-16 ***
## PopulationUM 0.265389 0.006631 17.145310 40.02 <2e-16 ***
## PopulationVA 0.272305 0.006320 14.402207 43.09 <2e-16 ***
## PopulationYE 0.264695 0.006334 14.494587 41.79 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.442
## PopulatinKA 0.482 0.443
## PopulatinMA 0.481 0.442 0.481
## PopulatinMU 0.482 0.443 0.482 0.481
## PopulatinRE 0.443 0.410 0.444 0.444 0.444
## PopulatinUM 0.461 0.424 0.461 0.461 0.461 0.426
## PopulatinVA 0.479 0.441 0.480 0.479 0.480 0.443 0.459
## PopulatinYE 0.481 0.442 0.481 0.480 0.481 0.443 0.459 0.479
p_DW_F_Hoedjes <- ggplot(data = (subset(d_DW_F,Supervisor.PI=='Hoedjes')), aes(x=Population_Lat, y=DW_micrograms, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_DW_F_Hoedjes", x="Population", y = "DW_micrograms") + ylim(c(min_DW, max_DW))+ droseu_theme
## quartz_off_screen
## 2
p_DW_F_pop_Hoedjes <- ggplot(data = (subset(d_DW_F,Supervisor.PI=='Hoedjes')), aes(x=Population_Lat, y=DW_micrograms, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_DW_F_pop_Hoedjes", x="Population", y = "DW_micrograms") + ylim(c(min_DW, max_DW))+geom_text(data = model_means_DW_F_Hoedjes_cld, aes(x = Population, label = cld), y = 1, vjust = 1) + droseu_theme
## quartz_off_screen
## 2
p_DW_M_Hoedjes <- ggplot(data = (subset(d_DW_M,Supervisor.PI=='Hoedjes')), aes(x=Population_Lat, y=DW_micrograms, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_DW_M_Hoedjes", x="Population", y = "DW_micrograms")+ ylim(c(min_DW, max_DW))+ droseu_theme
## quartz_off_screen
## 2
p_DW_M_pop_Hoedjes <- ggplot(data = (subset(d_DW_M,Supervisor.PI=='Hoedjes')), aes(x=Population_Lat, y=DW_micrograms, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_DW_M_pop_Hoedjes", x="Population", y = "DW_micrograms") + ylim(c(min_DW, max_DW))+geom_text(data = model_means_DW_F_Hoedjes_cld, aes(x = Population, label = cld), y = 1, vjust = 1) + droseu_theme
## quartz_off_screen
## 2
DW_F_lmer_Onder <- lmer(DW_micrograms ~ -1 + Population + (1|Population:Line) + (1|Batch), data = d_DW_F[d_DW_F$Supervisor.PI == "Onder",])
capture.output(summary(DW_F_lmer_Onder),file = "DryWeight/DW_F_lmer_Onder_sum.txt")
capture.output(anova(DW_F_lmer_Onder),file = "DryWeight/DW_F_lmer_Onder.txt")
capture.output(emmeans(DW_F_lmer_Onder, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "DryWeight/DW_F_lmer_Onder_tk.txt")
model_means_DW_F_Onder <- emmeans(object = DW_F_lmer_Onder, specs = ~ Population)
## Note: D.f. calculations have been disabled because the number of observations exceeds 3000.
## To enable adjustments, add the argument 'pbkrtest.limit = 4102' (or larger)
## [or, globally, 'set emm_options(pbkrtest.limit = 4102)' or larger];
## but be warned that this may result in large computation time and memory use.
## Note: D.f. calculations have been disabled because the number of observations exceeds 3000.
## To enable adjustments, add the argument 'lmerTest.limit = 4102' (or larger)
## [or, globally, 'set emm_options(lmerTest.limit = 4102)' or larger];
## but be warned that this may result in large computation time and memory use.
model_means_DW_F_Onder_cld <- cld(object = model_means_DW_F_Onder, adjust = "Tukey", Letters = letters, alpha = 0.05) %>% as.data.frame %>% mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))) %>% arrange(Population) %>% dplyr::rename(cld = .group)
## Note: adjust = "tukey" was changed to "sidak"
## because "tukey" is only appropriate for one set of pairwise comparisons
anova(DW_F_lmer_Onder)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 10.529 1.1699 9 22.027 442.39 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(DW_F_lmer_Onder)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: DW_micrograms ~ -1 + Population + (1 | Population:Line) + (1 |
## Batch)
## Data: d_DW_F[d_DW_F$Supervisor.PI == "Onder", ]
##
## REML criterion at convergence: -12234.8
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -4.7744 -0.5882 0.0568 0.6380 3.6377
##
## Random effects:
## Groups Name Variance Std.Dev.
## Population:Line (Intercept) 0.0011087 0.03330
## Batch (Intercept) 0.0002207 0.01485
## Residual 0.0026444 0.05142
## Number of obs: 4102, groups: Population:Line, 166; Batch, 5
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 0.42538 0.01032 17.78538 41.21 <2e-16 ***
## PopulationGI 0.43876 0.01129 24.51089 38.85 <2e-16 ***
## PopulationKA 0.46032 0.01033 17.79119 44.57 <2e-16 ***
## PopulationMA 0.46967 0.01032 17.78538 45.50 <2e-16 ***
## PopulationMU 0.44049 0.01028 17.55316 42.86 <2e-16 ***
## PopulationRE 0.46978 0.01106 22.77012 42.47 <2e-16 ***
## PopulationUM 0.46345 0.01082 21.12746 42.83 <2e-16 ***
## PopulationVA 0.47331 0.01025 17.46654 46.16 <2e-16 ***
## PopulationYE 0.42917 0.01062 19.78934 40.40 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.381
## PopulatinKA 0.409 0.391
## PopulatinMA 0.428 0.381 0.409
## PopulatinMU 0.426 0.383 0.414 0.426
## PopulatinRE 0.390 0.368 0.399 0.390 0.393
## PopulatinUM 0.388 0.366 0.405 0.388 0.394 0.377
## PopulatinVA 0.422 0.384 0.416 0.422 0.422 0.392 0.396
## PopulatinYE 0.412 0.370 0.400 0.412 0.412 0.380 0.382 0.409
DW_M_lmer_Onder <- lmer(DW_micrograms ~ -1 + Population + (1|Population:Line) + (1|Batch), data = d_DW_M[d_DW_M$Supervisor.PI == "Onder",])
capture.output(summary(DW_M_lmer_Onder),file = "DryWeight/DW_M_lmer_Onder_sum.txt")
capture.output(anova(DW_M_lmer_Onder),file = "DryWeight/DW_M_lmer_Onder.txt")
capture.output(emmeans(DW_M_lmer_Onder, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "DryWeight/DW_M_lmer_Onder_tk.txt")
model_means_DW_M_Onder <- emmeans(object = DW_M_lmer_Onder, specs = ~ Population)
## Note: D.f. calculations have been disabled because the number of observations exceeds 3000.
## To enable adjustments, add the argument 'pbkrtest.limit = 4101' (or larger)
## [or, globally, 'set emm_options(pbkrtest.limit = 4101)' or larger];
## but be warned that this may result in large computation time and memory use.
## Note: D.f. calculations have been disabled because the number of observations exceeds 3000.
## To enable adjustments, add the argument 'lmerTest.limit = 4101' (or larger)
## [or, globally, 'set emm_options(lmerTest.limit = 4101)' or larger];
## but be warned that this may result in large computation time and memory use.
model_means_DW_M_Onder_cld <- cld(object = model_means_DW_M_Onder, adjust = "Tukey", Letters = letters, alpha = 0.05) %>% as.data.frame %>% mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))) %>% arrange(Population) %>% dplyr::rename(cld = .group)
## Note: adjust = "tukey" was changed to "sidak"
## because "tukey" is only appropriate for one set of pairwise comparisons
anova(DW_M_lmer_Onder)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 2.9715 0.33016 9 20.883 362.71 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(DW_M_lmer_Onder)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: DW_micrograms ~ -1 + Population + (1 | Population:Line) + (1 |
## Batch)
## Data: d_DW_M[d_DW_M$Supervisor.PI == "Onder", ]
##
## REML criterion at convergence: -16576.3
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -4.2689 -0.6120 -0.0072 0.6481 4.0118
##
## Random effects:
## Groups Name Variance Std.Dev.
## Population:Line (Intercept) 4.358e-04 0.020877
## Batch (Intercept) 9.034e-05 0.009505
## Residual 9.103e-04 0.030171
## Number of obs: 4101, groups: Population:Line, 166; Batch, 5
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 0.255121 0.006505 16.361135 39.22 <2e-16 ***
## PopulationGI 0.251169 0.007103 22.374548 35.36 <2e-16 ***
## PopulationKA 0.263027 0.006508 16.367043 40.42 <2e-16 ***
## PopulationMA 0.271704 0.006505 16.357989 41.77 <2e-16 ***
## PopulationMU 0.261928 0.006478 16.156181 40.43 <2e-16 ***
## PopulationRE 0.264866 0.006961 20.830146 38.05 <2e-16 ***
## PopulationUM 0.267882 0.006813 19.358599 39.32 <2e-16 ***
## PopulationVA 0.266348 0.006465 16.073294 41.20 <2e-16 ***
## PopulationYE 0.252248 0.006691 18.153630 37.70 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.393
## PopulatinKA 0.422 0.403
## PopulatinMA 0.440 0.393 0.422
## PopulatinMU 0.438 0.396 0.427 0.438
## PopulatinRE 0.402 0.380 0.411 0.402 0.405
## PopulatinUM 0.401 0.378 0.417 0.401 0.407 0.389
## PopulatinVA 0.434 0.396 0.429 0.434 0.435 0.404 0.408
## PopulatinYE 0.425 0.382 0.412 0.425 0.424 0.392 0.394 0.421
p_DW_F_Onder <- ggplot(data = (subset(d_DW_F,Supervisor.PI=='Onder')), aes(x=Population_Lat, y=DW_micrograms, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_DW_F_Onder", x="Population", y = "DW_micrograms") + ylim(c(min_DW, max_DW))+ droseu_theme
## quartz_off_screen
## 2
p_DW_F_pop_Onder <- ggplot(data = (subset(d_DW_F,Supervisor.PI=='Onder')), aes(x=Population_Lat, y=DW_micrograms, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_DW_F_pop_Onder", x="Population", y = "DW_micrograms") + ylim(c(min_DW, max_DW))+geom_text(data = model_means_DW_F_Onder_cld, aes(x = Population, label = cld), y = 1, vjust = 1) + droseu_theme
## quartz_off_screen
## 2
p_DW_M_Onder <- ggplot(data = (subset(d_DW_M,Supervisor.PI=='Onder')), aes(x=Population_Lat, y=DW_micrograms, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_DW_M_Onder", x="Population", y = "DW_micrograms")+ ylim(c(min_DW, max_DW))+ droseu_theme
## quartz_off_screen
## 2
p_DW_M_pop_Onder <- ggplot(data = (subset(d_DW_M,Supervisor.PI=='Onder')), aes(x=Population_Lat, y=DW_micrograms, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_DW_M_pop_Onder", x="Population", y = "DW_micrograms")+ ylim(c(min_DW, max_DW))+geom_text(data = model_means_DW_M_Onder_cld, aes(x = Population, label = cld), y = 1, vjust = 1) + droseu_theme
## quartz_off_screen
## 2
intersect_Line_DW <- Reduce(intersect, list(d_DW$Line[d_DW$Supervisor.PI == "Colinet"],
d_DW$Line[d_DW$Supervisor.PI == "Hoedjes"],
d_DW$Line[d_DW$Supervisor.PI == "Onder"]))
write(intersect_Line_DW, file ="DryWeight/intersect_Line_DW.txt", sep = "\t")
intersect_Pop_DW <- Reduce(intersect, list(d_DW$Population[d_DW$Supervisor.PI == "Colinet"],
d_DW$Population[d_DW$Supervisor.PI == "Hoedjes"],
d_DW$Population[d_DW$Supervisor.PI == "Onder"]))
write(intersect_Pop_DW, file ="DryWeight/intersect_Pop_DW.txt", sep = "\t")
There are 161 populations and 9 isofemale lines that have been phenotyped across the labs. Please refer to tables named intersect_Trait_level (i.e. intersect_Via_pop) for details.
DW_fitted <- combineFitted(labs = rep(c("Colinet", "Onder", "Hoedjes"), 2), sex = rep(c("F", "M"), each = 3), models = list(DW_F_lmer_Colinet, DW_F_lmer_Hoedjes, DW_F_lmer_Onder, DW_M_lmer_Colinet, DW_M_lmer_Hoedjes, DW_M_lmer_Onder))
p_DW_F_lab_cor <- function() scatterPlotMatrix(DW_fitted, sex = "F")
p_DW_M_lab_cor <- function() scatterPlotMatrix(DW_fitted, sex = "M")
p_DW_F_lab_cor()
pdf(file="DryWeight/p_DW_F_lab_cor.pdf",width=8, height=8)
p_DW_F_lab_cor()
invisible(dev.off())
p_DW_M_lab_cor()
pdf(file="DryWeight/p_DW_M_lab_cor.pdf",width=8, height=8)
p_DW_M_lab_cor()
invisible(dev.off())
dir.create(file.path("ThoraxLength"), showWarnings = FALSE)
For a detailed description of tables, plots, linear models and outputs, please refer here
Kozeretska Lab : Svitlana Serga, Alexandra Protsenko, Oleksandr Maistrenko, Iryna Kozeretska
Posnien Lab : Micael Reis, Lennart Hüper
Ritchie Lab : Megan Mcgunnigle, Nicola Cook, Teresa Abaurrea, Michael Ritchie
Schmidt Lab : Amy Goldfischer, Paul Schmidt
Read data in R
d_TL <- read.csv("MasterSheets_Oct21_git/TL_MasterSheet_Feb22.csv")
str(d_TL)
## 'data.frame': 13754 obs. of 14 variables:
## $ Supervisor.PI : chr "Ritchie" "Ritchie" "Ritchie" "Ritchie" ...
## $ Diet : chr "S" "S" "S" "S" ...
## $ Batch : int 15 15 1 1 1 2 1 1 1 1 ...
## $ Population : chr "GI" "GI" "KA" "KA" ...
## $ Line : chr "GI5" "GI5" "KA1" "KA1" ...
## $ Sex : chr "M" "M" "M" "M" ...
## $ ReplicateVialOld: int 3 1 3 2 2 2 2 2 2 2 ...
## $ ReplicateVial : chr "Ritchie_15_GI5_3" "Ritchie_15_GI5_1" "Ritchie_1_KA1_3" "Ritchie_1_KA1_2" ...
## $ Individual : int 1117 1060 1210 1170 1169 51 1182 1173 1172 1171 ...
## $ TL_micrometers : num 300 340 460 514 515 521 552 558 565 580 ...
## $ Country : chr "Spain" "Spain" "Denmark" "Denmark" ...
## $ Latitude : num 41.6 41.6 55.9 55.9 55.9 ...
## $ Longitude : num 0.62 0.62 10.21 10.21 10.21 ...
## $ Altitude : int 173 173 15 15 15 173 15 15 15 15 ...
str(d_TL)
## 'data.frame': 13754 obs. of 14 variables:
## $ Supervisor.PI : chr "Ritchie" "Ritchie" "Ritchie" "Ritchie" ...
## $ Diet : chr "S" "S" "S" "S" ...
## $ Batch : int 15 15 1 1 1 2 1 1 1 1 ...
## $ Population : chr "GI" "GI" "KA" "KA" ...
## $ Line : chr "GI5" "GI5" "KA1" "KA1" ...
## $ Sex : chr "M" "M" "M" "M" ...
## $ ReplicateVialOld: int 3 1 3 2 2 2 2 2 2 2 ...
## $ ReplicateVial : chr "Ritchie_15_GI5_3" "Ritchie_15_GI5_1" "Ritchie_1_KA1_3" "Ritchie_1_KA1_2" ...
## $ Individual : int 1117 1060 1210 1170 1169 51 1182 1173 1172 1171 ...
## $ TL_micrometers : num 300 340 460 514 515 521 552 558 565 580 ...
## $ Country : chr "Spain" "Spain" "Denmark" "Denmark" ...
## $ Latitude : num 41.6 41.6 55.9 55.9 55.9 ...
## $ Longitude : num 0.62 0.62 10.21 10.21 10.21 ...
## $ Altitude : int 173 173 15 15 15 173 15 15 15 15 ...
d_TL$Supervisor.PI <- as.factor(d_TL$Supervisor.PI)
d_TL$Diet <- as.factor(d_TL$Diet)
d_TL$Batch <- as.factor(d_TL$Batch)
d_TL$Population_Lat <- factor(d_TL$Population, levels= c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))
d_TL$Population_Lon <- factor(d_TL$Population, levels= c("RE","GI","KA","MU","MA","AK","UM","YE","VA"))
d_TL$Population_Alt <- factor(d_TL$Population, levels= c("KA","AK","GI","RE","UM","VA","MU","MA","YE"))
d_TL$Line <- as.factor(d_TL$Line)
d_TL$Sex <- as.factor(d_TL$Sex)
d_TL$ReplicateVial <- as.factor(d_TL$ReplicateVial)
d_TL$TL_micrometers <- as.numeric(d_TL$TL_micrometers)
str(d_TL)
## 'data.frame': 13754 obs. of 17 variables:
## $ Supervisor.PI : Factor w/ 4 levels "Kozeretska","Posnien",..: 3 3 3 3 3 3 3 3 3 3 ...
## $ Diet : Factor w/ 2 levels "NS","S": 2 2 2 2 2 2 2 2 2 2 ...
## $ Batch : Factor w/ 12 levels "1","2","3","4",..: 12 12 1 1 1 2 1 1 1 1 ...
## $ Population : chr "GI" "GI" "KA" "KA" ...
## $ Line : Factor w/ 166 levels "AK1","AK10","AK11",..: 31 31 36 36 36 21 36 36 36 36 ...
## $ Sex : Factor w/ 2 levels "F","M": 2 2 2 2 2 2 2 2 2 2 ...
## $ ReplicateVialOld: int 3 1 3 2 2 2 2 2 2 2 ...
## $ ReplicateVial : Factor w/ 503 levels "Kozeretska_1_AK1_1",..: 298 296 271 270 270 306 270 270 270 270 ...
## $ Individual : int 1117 1060 1210 1170 1169 51 1182 1173 1172 1171 ...
## $ TL_micrometers : num 300 340 460 514 515 521 552 558 565 580 ...
## $ Country : chr "Spain" "Spain" "Denmark" "Denmark" ...
## $ Latitude : num 41.6 41.6 55.9 55.9 55.9 ...
## $ Longitude : num 0.62 0.62 10.21 10.21 10.21 ...
## $ Altitude : int 173 173 15 15 15 173 15 15 15 15 ...
## $ Population_Lat : Factor w/ 9 levels "YE","RE","GI",..: 3 3 7 7 7 3 7 7 7 7 ...
## $ Population_Lon : Factor w/ 9 levels "RE","GI","KA",..: 2 2 3 3 3 2 3 3 3 3 ...
## $ Population_Alt : Factor w/ 9 levels "KA","AK","GI",..: 3 3 1 1 1 3 1 1 1 1 ...
d_TL_F <-subset(d_TL,Sex=='F')
d_TL_M <-subset(d_TL,Sex=='M')
Descriptive statistics at the line level, with batch information :
Descriptive statistics at the line level, without batch information :
Descriptive statistics at the population level, with batch information :
Descriptive statistics at the population level, without batch information :
min_TL <- min(d_TL$TL_micrometers)
max_TL <- max(d_TL$TL_micrometers)
y-axis is scaled by the minimum (300) and maximum (1232) values in the full data set.
## quartz_off_screen
## 2
p_TL_M <- ggplot(data = d_TL_M, aes(x=Population_Lat, y=TL_micrometers, fill=Supervisor.PI)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_TL_M", x="Population", y = "TL_micrometers") + ylim(c(min_TL, max_TL))+ droseu_theme
## quartz_off_screen
## 2
TL_F_lmer_Kozeretska <- lmer(TL_micrometers ~ -1 + Population + (1|Line:Population) +
(1|Batch) + (1|ReplicateVial : Line : Population), data = (subset(d_TL_F,Supervisor.PI=='Kozeretska')))
capture.output(summary(TL_F_lmer_Kozeretska),file = "ThoraxLength/TL_F_Kozeretska_sum.txt")
capture.output(anova(TL_F_lmer_Kozeretska),file = "ThoraxLength/TL_F_lmer_Kozeretska.txt")
capture.output(emmeans(TL_F_lmer_Kozeretska, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "ThoraxLength/TL_F_tk.txt")
anova(TL_F_lmer_Kozeretska)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 101626895 11291877 9 18.383 5376.7 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(TL_F_lmer_Kozeretska)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: TL_micrometers ~ -1 + Population + (1 | Line:Population) + (1 |
## Batch) + (1 | ReplicateVial:Line:Population)
## Data: (subset(d_TL_F, Supervisor.PI == "Kozeretska"))
##
## REML criterion at convergence: 51045.4
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -4.4816 -0.6029 0.0635 0.6779 3.5476
##
## Random effects:
## Groups Name Variance Std.Dev.
## ReplicateVial:Line:Population (Intercept) 948.79 30.802
## Line:Population (Intercept) 768.84 27.728
## Batch (Intercept) 16.12 4.015
## Residual 2100.14 45.827
## Number of obs: 4810, groups:
## ReplicateVial:Line:Population, 241; Line:Population, 130; Batch, 2
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 936.544 8.986 32.411 104.22 <2e-16 ***
## PopulationGI 935.037 12.728 75.478 73.46 <2e-16 ***
## PopulationKA 911.623 10.772 51.655 84.63 <2e-16 ***
## PopulationMA 964.296 9.484 38.144 101.68 <2e-16 ***
## PopulationMU 942.891 9.327 35.982 101.10 <2e-16 ***
## PopulationRE 962.396 11.023 56.137 87.31 <2e-16 ***
## PopulationUM 941.462 10.896 53.786 86.41 <2e-16 ***
## PopulationVA 958.365 8.796 30.030 108.95 <2e-16 ***
## PopulationYE 950.414 10.721 52.965 88.65 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.071
## PopulatinKA 0.083 0.059
## PopulatinMA 0.096 0.068 0.079
## PopulatinMU 0.097 0.068 0.080 0.092
## PopulatinRE 0.081 0.057 0.068 0.077 0.078
## PopulatinUM 0.083 0.058 0.069 0.078 0.079 0.067
## PopulatinVA 0.102 0.072 0.085 0.097 0.098 0.083 0.084
## PopulatinYE 0.085 0.060 0.070 0.080 0.081 0.068 0.069 0.086
TL_M_lmer_Kozeretska <- lmer(TL_micrometers ~ -1 + Population + (1|Line:Population) +
(1|Batch) + (1|ReplicateVial : Line : Population), data = (subset(d_TL_M,Supervisor.PI=='Kozeretska')))
capture.output(summary(TL_M_lmer_Kozeretska),file = "ThoraxLength/TL_M_Kozeretska_sum.txt")
capture.output(anova(TL_M_lmer_Kozeretska),file = "ThoraxLength/TL_M_lmer_Kozeretska.txt")
capture.output(emmeans(TL_M_lmer_Kozeretska, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "ThoraxLength/TL_M_tk.txt")
anova(TL_M_lmer_Kozeretska)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 86499621 9611069 9 31.607 5283.6 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(TL_M_lmer_Kozeretska)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: TL_micrometers ~ -1 + Population + (1 | Line:Population) + (1 |
## Batch) + (1 | ReplicateVial:Line:Population)
## Data: (subset(d_TL_M, Supervisor.PI == "Kozeretska"))
##
## REML criterion at convergence: 50338.6
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -4.8281 -0.5822 0.0434 0.6572 7.9545
##
## Random effects:
## Groups Name Variance Std.Dev.
## ReplicateVial:Line:Population (Intercept) 902.20 30.037
## Line:Population (Intercept) 672.50 25.933
## Batch (Intercept) 11.11 3.332
## Residual 1819.04 42.650
## Number of obs: 4807, groups:
## ReplicateVial:Line:Population, 241; Line:Population, 130; Batch, 2
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 835.238 8.442 38.650 98.94 <2e-16 ***
## PopulationGI 831.229 12.031 83.536 69.09 <2e-16 ***
## PopulationKA 812.504 10.148 59.023 80.07 <2e-16 ***
## PopulationMA 862.800 8.922 45.162 96.70 <2e-16 ***
## PopulationMU 838.174 8.766 42.553 95.62 <2e-16 ***
## PopulationRE 859.844 10.396 64.279 82.71 <2e-16 ***
## PopulationUM 838.730 10.270 61.509 81.67 <2e-16 ***
## PopulationVA 858.463 8.254 35.756 104.01 <2e-16 ***
## PopulationYE 845.745 10.109 61.155 83.66 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.055
## PopulatinKA 0.065 0.045
## PopulatinMA 0.075 0.052 0.061
## PopulatinMU 0.075 0.053 0.062 0.071
## PopulatinRE 0.063 0.044 0.053 0.060 0.061
## PopulatinUM 0.064 0.045 0.053 0.061 0.062 0.052
## PopulatinVA 0.080 0.056 0.066 0.076 0.077 0.065 0.066
## PopulatinYE 0.066 0.046 0.054 0.062 0.063 0.053 0.054 0.067
p_TL_F_Kozeretska <- ggplot(data = (subset(d_TL_F,Supervisor.PI=='Kozeretska')), aes(x=Population_Lat, y=TL_micrometers, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_TL_F_Kozeretska", x="Population", y = "TL_micrometers") + ylim(c(min_TL, max_TL))+ droseu_theme
## quartz_off_screen
## 2
p_TL_F_pop_Kozeretska <- ggplot(data = (subset(d_TL_F,Supervisor.PI=='Kozeretska')), aes(x=Population_Lat, y=TL_micrometers, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_TL_F_pop_Kozeretska", x="Population", y = "TL_micrometers") + ylim(c(min_TL, max_TL))+ droseu_theme
## quartz_off_screen
## 2
p_TL_M_Kozeretska <- ggplot(data = (subset(d_TL_M,Supervisor.PI=='Kozeretska')), aes(x=Population_Lat, y=TL_micrometers, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_TL_M_Kozeretska", x="Population", y = "TL_micrometers") + ylim(c(min_TL, max_TL))+ droseu_theme
## quartz_off_screen
## 2
p_TL_M_pop_Kozeretska <- ggplot(data = (subset(d_TL_M,Supervisor.PI=='Kozeretska')), aes(x=Population_Lat, y=TL_micrometers, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_TL_M_pop_Kozeretska", x="Population", y = "TL_micrometers") + ylim(c(min_TL, max_TL))+ droseu_theme
## quartz_off_screen
## 2
TL_F_lmer_Posnien <- lmer(TL_micrometers ~ -1 + Population + (1|Line:Population)+
(1|ReplicateVial : Line : Population), data = (subset(d_TL_F,Supervisor.PI=='Posnien')))
capture.output(summary(TL_F_lmer_Posnien),file = "ThoraxLength/TL_F_Posnien_sum.txt")
capture.output(anova(TL_F_lmer_Posnien),file = "ThoraxLength/TL_F_lmer_Posnien.txt")
capture.output(emmeans(TL_F_lmer_Posnien, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "ThoraxLength/TL_F_lmer_Posnientk.txt")
anova(TL_F_lmer_Posnien)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 29385611 3265068 9 18 2123.9 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(TL_F_lmer_Posnien)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: TL_micrometers ~ -1 + Population + (1 | Line:Population) + (1 |
## ReplicateVial:Line:Population)
## Data: (subset(d_TL_F, Supervisor.PI == "Posnien"))
##
## REML criterion at convergence: 2722.8
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.86894 -0.60033 0.05782 0.63035 2.78455
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 542.6 23.29
## ReplicateVial:Line:Population (Intercept) 463.9 21.54
## Residual 1537.3 39.21
## Number of obs: 270, groups:
## Line:Population, 27; ReplicateVial:Line:Population, 27
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 880.66 19.67 18.00 44.78 <2e-16 ***
## PopulationGI 944.38 19.67 18.00 48.02 <2e-16 ***
## PopulationKA 928.61 19.67 18.00 47.22 <2e-16 ***
## PopulationMA 882.00 19.67 18.00 44.85 <2e-16 ***
## PopulationMU 866.23 19.67 18.00 44.05 <2e-16 ***
## PopulationRE 902.77 19.67 18.00 45.91 <2e-16 ***
## PopulationUM 908.43 19.67 18.00 46.19 <2e-16 ***
## PopulationVA 898.43 19.67 18.00 45.69 <2e-16 ***
## PopulationYE 941.85 19.67 18.00 47.89 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.000
## PopulatinKA 0.000 0.000
## PopulatinMA 0.000 0.000 0.000
## PopulatinMU 0.000 0.000 0.000 0.000
## PopulatinRE 0.000 0.000 0.000 0.000 0.000
## PopulatinUM 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinVA 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinYE 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
TL_M_lmer_Posnien <- lmer(TL_micrometers ~ -1 + Population + (1|Line:Population), data = (subset(d_TL_M,Supervisor.PI=='Posnien')))
capture.output(summary(TL_M_lmer_Posnien),file = "ThoraxLength/TL_M_Posnien_sum.txt")
capture.output(anova(TL_M_lmer_Posnien),file = "ThoraxLength/TL_M_lmer_Posnien.txt")
capture.output(emmeans(TL_M_lmer_Posnien, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "ThoraxLength/TL_M_lmer_Posnien_tk.txt")
anova(TL_M_lmer_Posnien)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 22599074 2511008 9 18 2066.5 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(TL_M_lmer_Posnien)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: TL_micrometers ~ -1 + Population + (1 | Line:Population)
## Data: (subset(d_TL_M, Supervisor.PI == "Posnien"))
##
## REML criterion at convergence: 2661.8
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.7213 -0.5390 -0.0356 0.5975 3.7202
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 814.9 28.55
## Residual 1215.1 34.86
## Number of obs: 270, groups: Line:Population, 27
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 777.16 17.67 18.00 43.99 <2e-16 ***
## PopulationGI 841.23 17.67 18.00 47.61 <2e-16 ***
## PopulationKA 823.56 17.67 18.00 46.61 <2e-16 ***
## PopulationMA 785.43 17.67 18.00 44.46 <2e-16 ***
## PopulationMU 756.66 17.67 18.00 42.83 <2e-16 ***
## PopulationRE 802.59 17.67 18.00 45.43 <2e-16 ***
## PopulationUM 821.89 17.67 18.00 46.52 <2e-16 ***
## PopulationVA 796.67 17.67 18.00 45.09 <2e-16 ***
## PopulationYE 819.56 17.67 18.00 46.39 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.000
## PopulatinKA 0.000 0.000
## PopulatinMA 0.000 0.000 0.000
## PopulatinMU 0.000 0.000 0.000 0.000
## PopulatinRE 0.000 0.000 0.000 0.000 0.000
## PopulatinUM 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinVA 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinYE 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
p_TL_F_Posnien <- ggplot(data = (subset(d_TL_F,Supervisor.PI=='Posnien')), aes(x=Population_Lat, y=TL_micrometers, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_TL_F_Posnien", x="Population", y = "TL_micrometers") + ylim(c(min_TL, max_TL))+ droseu_theme
## quartz_off_screen
## 2
p_TL_F_pop_Posnien <- ggplot(data = (subset(d_TL_F,Supervisor.PI=='Posnien')), aes(x=Population_Lat, y=TL_micrometers, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_TL_F_pop_Posnien", x="Population", y = "TL_micrometers")+ ylim(c(min_TL, max_TL))+ droseu_theme
## quartz_off_screen
## 2
p_TL_M_Posnien <- ggplot(data = (subset(d_TL_M,Supervisor.PI=='Posnien')), aes(x=Population_Lat, y=TL_micrometers, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_TL_M_Posnien", x="Population", y = "TL_micrometers")+ ylim(c(min_TL, max_TL))+ droseu_theme
## quartz_off_screen
## 2
p_TL_M_pop_Posnien <- ggplot(data = (subset(d_TL_M,Supervisor.PI=='Posnien')), aes(x=Population_Lat, y=TL_micrometers, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_TL_M_pop_Posnien", x="Population", y = "TL_micrometers") + ylim(c(min_TL, max_TL))+ droseu_theme
## quartz_off_screen
## 2
TL_F_lmer_Ritchie <- lmer(TL_micrometers ~ -1 + Population + (1|Line:Population) +
(1|Batch), data = (subset(d_TL_F,Supervisor.PI=='Ritchie')))
capture.output(summary(TL_F_lmer_Ritchie),file = "ThoraxLength/TL_F_Ritchie_sum.txt")
capture.output(anova(TL_F_lmer_Ritchie),file = "ThoraxLength/TL_F_lmer_Ritchie.txt")
capture.output(emmeans(TL_F_lmer_Ritchie, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "ThoraxLength/TL_F_lmer_Ritchie_tk.txt")
anova(TL_F_lmer_Ritchie)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 24034212 4005702 6 12.87 1422.3 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(TL_F_lmer_Ritchie)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: TL_micrometers ~ -1 + Population + (1 | Line:Population) + (1 |
## Batch)
## Data: (subset(d_TL_F, Supervisor.PI == "Ritchie"))
##
## REML criterion at convergence: 11444.5
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -4.7332 -0.5260 0.0394 0.6188 5.1914
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 776.8 27.87
## Batch (Intercept) 913.4 30.22
## Residual 2816.3 53.07
## Number of obs: 1059, groups: Line:Population, 26; Batch, 12
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 955.31 19.71 19.55 48.46 <2e-16 ***
## PopulationGI 969.43 18.08 18.38 53.62 <2e-16 ***
## PopulationKA 956.35 18.44 17.17 51.86 <2e-16 ***
## PopulationMA 976.97 18.40 17.01 53.11 <2e-16 ***
## PopulationMU 970.78 25.57 17.64 37.97 <2e-16 ***
## PopulationYE 988.71 17.62 19.32 56.10 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU
## PopulatinGI 0.446
## PopulatinKA 0.011 0.013
## PopulatinMA 0.011 0.013 0.501
## PopulatinMU 0.053 0.063 0.202 0.203
## PopulatinYE 0.300 0.353 0.036 0.036 0.177
TL_M_lmer_Ritchie <- lmer(TL_micrometers ~ -1 + Population + (1|Line:Population) +
(1|Batch), data = (subset(d_TL_M,Supervisor.PI=='Ritchie')))
capture.output(summary(TL_M_lmer_Ritchie),file = "ThoraxLength/TL_M_Ritchie_sum.txt")
capture.output(anova(TL_M_lmer_Ritchie),file = "ThoraxLength/TL_M_lmer_Ritchie.txt")
capture.output(emmeans(TL_M_lmer_Ritchie, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "ThoraxLength/TL_M_lmer_Ritchie_tk.txt")
anova(TL_M_lmer_Ritchie)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 16132204 2688701 6 12.765 751.17 1.654e-15 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(TL_M_lmer_Ritchie)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: TL_micrometers ~ -1 + Population + (1 | Line:Population) + (1 |
## Batch)
## Data: (subset(d_TL_M, Supervisor.PI == "Ritchie"))
##
## REML criterion at convergence: 11309.7
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -8.8016 -0.5065 0.0525 0.5479 3.8390
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 824.6 28.72
## Batch (Intercept) 1396.0 37.36
## Residual 3579.3 59.83
## Number of obs: 1024, groups: Line:Population, 26; Batch, 12
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 826.89 22.01 19.34 37.56 <2e-16 ***
## PopulationGI 823.04 20.37 18.13 40.40 <2e-16 ***
## PopulationKA 815.06 20.90 16.85 38.99 <2e-16 ***
## PopulationMA 840.52 20.91 16.88 40.20 <2e-16 ***
## PopulationMU 844.55 27.74 17.96 30.44 <2e-16 ***
## PopulationYE 846.22 19.75 19.14 42.84 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU
## PopulatinGI 0.523
## PopulatinKA 0.020 0.023
## PopulatinMA 0.020 0.023 0.581
## PopulatinMU 0.080 0.092 0.252 0.252
## PopulatinYE 0.372 0.427 0.054 0.054 0.215
p_TL_F_Ritchie <- filter(d_TL_F, Supervisor.PI == "Ritchie") %>%
ggplot(aes(x=Population_Lat, y=TL_micrometers, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_TL_F_Ritchie", x="Population", y = "TL_micrometers") +
ylim(c(min_TL, max_TL)) +
droseu_theme
## quartz_off_screen
## 2
p_TL_F_pop_Ritchie <- ggplot(data = (subset(d_TL_F,Supervisor.PI=='Ritchie')), aes(x=Population_Lat, y=TL_micrometers, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_TL_F_pop_Ritchie", x="Population", y = "TL_micrometers")+ coord_cartesian(ylim =c(min_TL, max_TL))+ droseu_theme
dev.off()
## null device
## 1
## quartz_off_screen
## 2
p_TL_M_Ritchie <- ggplot(data = (subset(d_TL_M,Supervisor.PI=='Ritchie')), aes(x=Population_Lat, y=TL_micrometers, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_TL_M_Ritchie", x="Population", y = "TL_micrometers")+ ylim(c(min_TL, max_TL))+ droseu_theme
## quartz_off_screen
## 2
p_TL_M_pop_Ritchie <- ggplot(data = (subset(d_TL_M,Supervisor.PI=='Ritchie')), aes(x=Population_Lat, y=TL_micrometers, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_TL_M_pop_Ritchie", x="Population", y = "TL_micrometers")+ ylim(c(min_TL, max_TL))+ droseu_theme
## quartz_off_screen
## 2
TL_F_lmer_Schmidt <- lmer(TL_micrometers ~ -1 + Population + (1|Line:Population), data = (subset(d_TL_F,Supervisor.PI=='Schmidt')))
capture.output(summary(TL_F_lmer_Schmidt),file = "ThoraxLength/TL_F_Schmidt_sum.txt")
capture.output(anova(TL_F_lmer_Schmidt),file = "ThoraxLength/TL_F_lmer_Schmidt.txt")
capture.output(emmeans(TL_F_lmer_Schmidt, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "ThoraxLength/TL_F_lmer_Schmidt_tk.txt")
anova(TL_F_lmer_Schmidt)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 355502327 39500259 9 146.65 31323 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(TL_F_lmer_Schmidt)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: TL_micrometers ~ -1 + Population + (1 | Line:Population)
## Data: (subset(d_TL_F, Supervisor.PI == "Schmidt"))
##
## REML criterion at convergence: 15278.8
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -8.8431 -0.5418 0.0956 0.6004 2.7028
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 436.8 20.90
## Residual 1261.1 35.51
## Number of obs: 1514, groups: Line:Population, 157
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 995.047 5.305 143.475 187.6 <2e-16 ***
## PopulationGI 1021.950 6.661 149.941 153.4 <2e-16 ***
## PopulationKA 1005.383 5.440 143.154 184.8 <2e-16 ***
## PopulationMA 1014.892 5.487 147.165 185.0 <2e-16 ***
## PopulationMU 1004.770 5.318 144.672 189.0 <2e-16 ***
## PopulationRE 1036.717 6.446 152.174 160.8 <2e-16 ***
## PopulationUM 1011.081 6.153 145.685 164.3 <2e-16 ***
## PopulationVA 1012.334 5.764 144.330 175.6 <2e-16 ***
## PopulationYE 1009.885 5.367 149.854 188.2 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.000
## PopulatinKA 0.000 0.000
## PopulatinMA 0.000 0.000 0.000
## PopulatinMU 0.000 0.000 0.000 0.000
## PopulatinRE 0.000 0.000 0.000 0.000 0.000
## PopulatinUM 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinVA 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinYE 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
p_TL_F_Schmidt <- ggplot(data = (subset(d_TL_F,Supervisor.PI=='Schmidt')), aes(x=Population_Lat, y=TL_micrometers, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_TL_F_Schmidt", x="Population", y = "TL_micrometers") + ylim(c(min_TL, max_TL))+ droseu_theme
## quartz_off_screen
## 2
p_TL_F_pop_Schmidt <- ggplot(data = (subset(d_TL_F,Supervisor.PI=='Schmidt')), aes(x=Population_Lat, y=TL_micrometers, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_TL_F_pop_Schmidt", x="Population", y = "TL_micrometers") + ylim(c(min_TL, max_TL))+ droseu_theme
## quartz_off_screen
## 2
intersect_Line_TL <- Reduce(intersect, list(d_TL$Line[d_TL$Supervisor.PI == "Kozeretska"],
d_TL$Line[d_TL$Supervisor.PI == "Posnien"],
d_TL$Line[d_TL$Supervisor.PI == "Ritchie"],
d_TL$Line[d_TL$Supervisor.PI == "Schmidt"]))
write(intersect_Line_TL, file ="ThoraxLength/intersect_Line_TL.txt", sep = "\t")
intersect_Pop_TL <- Reduce(intersect, list(d_TL$Population[d_TL$Supervisor.PI == "Kozeretska"],
d_TL$Population[d_TL$Supervisor.PI == "Posnien"],
d_TL$Population[d_TL$Supervisor.PI == "Ritchie"],
d_TL$Population[d_TL$Supervisor.PI == "Schmidt"]))
write(intersect_Pop_TL, file ="ThoraxLength/intersect_Pop_TL.txt", sep = "\t")
There are 4 populations and 6 isofemale lines that have been phenotyped across the labs. Please refer to tables named intersect_Trait_level (i.e. intersect_Via_pop) for details.
TL_fitted <- combineFitted(labs = rep(c("Kozeretska", "Posnien", "Ritchie"), 2), sex = rep(c("F", "M"), each = 3), models = list(TL_F_lmer_Kozeretska, TL_F_lmer_Posnien, TL_F_lmer_Ritchie, TL_M_lmer_Kozeretska, TL_M_lmer_Posnien, TL_M_lmer_Ritchie)) %>%
bind_rows(combineFitted(labs = "Schmidt", sex = "F", models = list(TL_F_lmer_Schmidt)))
p_TL_F_lab_cor <- function() scatterPlotMatrix(TL_fitted, sex = "F")
p_TL_M_lab_cor <- function() scatterPlotMatrix(TL_fitted, sex = "M")
p_TL_F_lab_cor()
pdf(file="ThoraxLength/p_TL_F_lab_cor.pdf",width=8, height=8)
p_TL_F_lab_cor()
invisible(dev.off())
p_TL_M_lab_cor()
pdf(file="ThoraxLength/p_TL_M_lab_cor.pdf",width=8, height=8)
p_TL_M_lab_cor()
invisible(dev.off())
dir.create(file.path("WingArea"), showWarnings = FALSE)
For a detailed description of tables, plots, linear models and outputs, please refer here
Onder Lab : Cansu Aksoy, Ekin Demir, Ezgi Cobanoglu, Banu Sebnem Onder
Posnien Lab : Micael Reis, Lennart Hüper, Nico Posnien
Ritchie Lab : Megan Mcgunnigle, Nicola Cook, Teresa Abaurrea, Marija Tanaskovic, Michael Ritchie
Stamenkovic-Radak Lab : Marija Savic Veselinovic, Marija Tanaskovic, Aleksandra Patenkovic, Filip Filopovski, Mihailo Jelic, Katarina Eric, Pavle Eric, Slobodan Davidovic, Marina Stamenkovic-Radak
d_WA <- read.csv("MasterSheets_Oct21_git/WA_MasterSheet_Nov21.csv")
str(d_WA)
## 'data.frame': 21201 obs. of 15 variables:
## $ Supervisor.PI : chr "StamenkovicRadak" "StamenkovicRadak" "StamenkovicRadak" "StamenkovicRadak" ...
## $ Diet : chr "NS" "NS" "NS" "NS" ...
## $ Batch : int 1 1 1 1 1 1 1 1 1 1 ...
## $ Population : chr "YE" "YE" "YE" "YE" ...
## $ Line : chr "YE13" "YE13" "YE13" "YE13" ...
## $ Sex : chr "F" "F" "F" "F" ...
## $ ReplicateVialOld : int 1 1 1 1 1 1 1 1 1 1 ...
## $ ReplicateVial : chr "StamenkovicRadak_1_YE13_1" "StamenkovicRadak_1_YE13_1" "StamenkovicRadak_1_YE13_1" "StamenkovicRadak_1_YE13_1" ...
## $ Individual : int 1 2 3 4 5 6 7 8 9 10 ...
## $ CentroidSizeLeft_micrometers : num 2869 2910 2901 3050 2906 ...
## $ CentroidSizeRight_micrometers: num 2891 2889 2881 3039 2919 ...
## $ Country : chr "Turkey" "Turkey" "Turkey" "Turkey" ...
## $ Latitude : num 40.2 40.2 40.2 40.2 40.2 ...
## $ Longitude : num 32.3 32.3 32.3 32.3 32.3 ...
## $ Altitude : int 680 680 680 680 680 680 680 680 680 680 ...
d_WA$Supervisor.PI <- as.factor(d_WA$Supervisor.PI)
d_WA$Diet <- as.factor(d_WA$Diet)
d_WA$Batch <- as.factor(d_WA$Batch)
d_WA$Population_Lat <- factor(d_WA$Population, levels= c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))
d_WA$Population_Lon <- factor(d_WA$Population, levels= c("RE","GI","KA","MU","MA","AK","UM","YE","VA"))
d_WA$Population_Alt <- factor(d_WA$Population, levels= c("KA","AK","GI","RE","UM","VA","MU","MA","YE"))
d_WA$Line <- as.factor(d_WA$Line)
d_WA$Sex <- as.factor(d_WA$Sex)
d_WA$ReplicateVial <- as.factor(d_WA$ReplicateVial)
d_WA$CentroidSizeLeft_micrometers <- as.numeric(d_WA$CentroidSizeLeft_micrometers)
d_WA$CentroidSizeRight_micrometers <- as.numeric(d_WA$CentroidSizeRight_micrometers)
str(d_WA)
## 'data.frame': 21201 obs. of 18 variables:
## $ Supervisor.PI : Factor w/ 4 levels "Onder","Posnien",..: 4 4 4 4 4 4 4 4 4 4 ...
## $ Diet : Factor w/ 2 levels "NS","S": 1 1 1 1 1 1 1 1 1 1 ...
## $ Batch : Factor w/ 15 levels "1","2","3","4",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Population : chr "YE" "YE" "YE" "YE" ...
## $ Line : Factor w/ 172 levels "AK1","AK10","AK11",..: 154 154 154 154 154 154 154 154 154 154 ...
## $ Sex : Factor w/ 2 levels "F","M": 1 1 1 1 1 1 1 1 1 1 ...
## $ ReplicateVialOld : int 1 1 1 1 1 1 1 1 1 1 ...
## $ ReplicateVial : Factor w/ 806 levels "Onder_1_AK1_1",..: 711 711 711 711 711 711 711 711 711 711 ...
## $ Individual : int 1 2 3 4 5 6 7 8 9 10 ...
## $ CentroidSizeLeft_micrometers : num 2869 2910 2901 3050 2906 ...
## $ CentroidSizeRight_micrometers: num 2891 2889 2881 3039 2919 ...
## $ Country : chr "Turkey" "Turkey" "Turkey" "Turkey" ...
## $ Latitude : num 40.2 40.2 40.2 40.2 40.2 ...
## $ Longitude : num 32.3 32.3 32.3 32.3 32.3 ...
## $ Altitude : int 680 680 680 680 680 680 680 680 680 680 ...
## $ Population_Lat : Factor w/ 9 levels "YE","RE","GI",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Population_Lon : Factor w/ 9 levels "RE","GI","KA",..: 8 8 8 8 8 8 8 8 8 8 ...
## $ Population_Alt : Factor w/ 9 levels "KA","AK","GI",..: 9 9 9 9 9 9 9 9 9 9 ...
d_WA_F <-subset(d_WA,Sex=='F')
d_WA_M <-subset(d_WA,Sex=='M')
Descriptive statistics at the line level, with batch information :
Descriptive statistics at the line level, without batch information :
Descriptive statistics at the population level, with batch information :
Descriptive statistics at the population level, without batch information :
min_WAL <- min(d_WA$CentroidSizeLeft_micrometers)
max_WAL <- max(d_WA$CentroidSizeLeft_micrometers)
y-axis is scaled by the minimum (1857.612491) and maximum (3333.0502) values in the full data set.
p_WA_F_L <- ggplot(data = d_WA_F, aes(x=Population_Lat, y=CentroidSizeLeft_micrometers, fill=Supervisor.PI)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_WA_F_L", x="Population", y = "CentroidSizeLeft_micrometers") + ylim(c(min_WAL, max_WAL))+ droseu_theme
## quartz_off_screen
## 2
p_WA_M_L <- ggplot(data = d_WA_M, aes(x=Population_Lat, y=CentroidSizeLeft_micrometers, fill=Supervisor.PI)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_WA_M_L", x="Population", y = "CentroidSizeLeft_micrometers")+ ylim(c(min_WAL, max_WAL))+ droseu_theme
## quartz_off_screen
## 2
WA_F_L_Onder_lmer <- lmer(CentroidSizeLeft_micrometers ~ -1 + Population + (1|Line:Population) + (1|Batch) + (1|ReplicateVial:Line:Population), data = d_WA_F %>% filter(Supervisor.PI=='Onder'))
capture.output(summary(WA_F_L_Onder_lmer),file = "WingArea/WA_F_L_Onder_sum.txt")
capture.output(anova(WA_F_L_Onder_lmer),file = "WingArea/WA_F_L_Onder_lmer.txt")
capture.output(emmeans(WA_F_L_Onder_lmer, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "WingArea/WA_F_L_Onder_lmer_tk.txt")
anova(WA_F_L_Onder_lmer)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 233520534 25946726 9 25.192 4460.1 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(WA_F_L_Onder_lmer)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula:
## CentroidSizeLeft_micrometers ~ -1 + Population + (1 | Line:Population) +
## (1 | Batch) + (1 | ReplicateVial:Line:Population)
## Data: d_WA_F %>% filter(Supervisor.PI == "Onder")
##
## REML criterion at convergence: 61105.4
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -5.7289 -0.5621 0.0553 0.6206 4.0410
##
## Random effects:
## Groups Name Variance Std.Dev.
## ReplicateVial:Line:Population (Intercept) 781.8 27.96
## Line:Population (Intercept) 3091.0 55.60
## Batch (Intercept) 1209.8 34.78
## Residual 5817.5 76.27
## Number of obs: 5247, groups:
## ReplicateVial:Line:Population, 518; Line:Population, 167; Batch, 7
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 2813.82 19.10 14.95 147.3 <2e-16 ***
## PopulationGI 2852.89 20.67 19.89 138.0 <2e-16 ***
## PopulationKA 2858.67 19.15 15.07 149.2 <2e-16 ***
## PopulationMA 2898.81 19.20 15.14 151.0 <2e-16 ***
## PopulationMU 2860.10 18.91 14.53 151.3 <2e-16 ***
## PopulationRE 2943.87 20.22 18.43 145.6 <2e-16 ***
## PopulationUM 2901.10 19.80 17.13 146.5 <2e-16 ***
## PopulationVA 2843.50 19.07 14.84 149.1 <2e-16 ***
## PopulationYE 2815.30 19.23 15.38 146.4 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.467
## PopulatinKA 0.487 0.466
## PopulatinMA 0.516 0.469 0.488
## PopulatinMU 0.504 0.462 0.497 0.505
## PopulatinRE 0.472 0.444 0.478 0.472 0.475
## PopulatinUM 0.474 0.447 0.487 0.473 0.478 0.460
## PopulatinVA 0.505 0.470 0.507 0.508 0.507 0.479 0.483
## PopulatinYE 0.500 0.463 0.497 0.500 0.499 0.473 0.477 0.503
WA_M_L_Onder_lmer <- lmer(CentroidSizeLeft_micrometers ~ -1 + Population + (1|Line:Population) +
(1|Batch) + (1|ReplicateVial : Line : Population), data = (subset(d_WA_M,Supervisor.PI=='Onder')))
capture.output(summary(WA_M_L_Onder_lmer),file = "WingArea/WA_M_L_Onder_sum.txt")
capture.output(anova(WA_M_L_Onder_lmer),file = "WingArea/WA_M_L_Onder_lmer.txt")
capture.output(emmeans(WA_M_L_Onder_lmer, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "WingArea/WA_M_L_Onder_lmer_tk.txt")
anova(WA_M_L_Onder_lmer)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 418745747 46527305 9 25.189 9902 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(WA_M_L_Onder_lmer)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula:
## CentroidSizeLeft_micrometers ~ -1 + Population + (1 | Line:Population) +
## (1 | Batch) + (1 | ReplicateVial:Line:Population)
## Data: (subset(d_WA_M, Supervisor.PI == "Onder"))
##
## REML criterion at convergence: 59806.9
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -4.2993 -0.5880 0.0332 0.6103 5.8833
##
## Random effects:
## Groups Name Variance Std.Dev.
## ReplicateVial:Line:Population (Intercept) 765.5 27.67
## Line:Population (Intercept) 2085.2 45.66
## Batch (Intercept) 336.6 18.35
## Residual 4698.8 68.55
## Number of obs: 5230, groups:
## ReplicateVial:Line:Population, 518; Line:Population, 167; Batch, 7
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 2444.13 13.49 29.28 181.2 <2e-16 ***
## PopulationGI 2476.23 15.02 41.35 164.9 <2e-16 ***
## PopulationKA 2478.28 13.53 29.32 183.1 <2e-16 ***
## PopulationMA 2509.23 13.57 29.21 184.9 <2e-16 ***
## PopulationMU 2479.17 13.31 29.20 186.3 <2e-16 ***
## PopulationRE 2545.32 14.62 38.49 174.1 <2e-16 ***
## PopulationUM 2513.23 14.19 35.53 177.1 <2e-16 ***
## PopulationVA 2488.63 13.45 28.93 185.0 <2e-16 ***
## PopulationYE 2440.14 13.63 30.92 179.0 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.271
## PopulatinKA 0.279 0.271
## PopulatinMA 0.317 0.275 0.282
## PopulatinMU 0.298 0.263 0.290 0.301
## PopulatinRE 0.272 0.254 0.280 0.273 0.274
## PopulatinUM 0.271 0.254 0.288 0.270 0.273 0.265
## PopulatinVA 0.301 0.274 0.305 0.306 0.301 0.280 0.281
## PopulatinYE 0.296 0.268 0.293 0.298 0.293 0.275 0.276 0.300
p_WA_F_L_Onder <- ggplot(data = (subset(d_WA_F,Supervisor.PI=='Onder')), aes(x=Population_Lat, y=CentroidSizeLeft_micrometers, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_WA_F_Onder_L", x="Population", y = "CentroidSizeLeft_micrometers") + ylim(c(min_WAL, max_WAL))+ droseu_theme
## quartz_off_screen
## 2
p_WA_F_L_pop_Onder <- ggplot(data = (subset(d_WA_F,Supervisor.PI=='Onder')), aes(x=Population_Lat, y=CentroidSizeLeft_micrometers, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_WA_F_L_pop_Onder", x="Population", y = "CentroidSizeLeft_micrometers") + ylim(c(min_WAL, max_WAL))+ droseu_theme
## quartz_off_screen
## 2
p_WA_M_L_Onder <- ggplot(data = (subset(d_WA_M,Supervisor.PI=='Onder')), aes(x=Population_Lat, y=CentroidSizeLeft_micrometers, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_WA_M_Onder_L", x="Population", y = "CentroidSizeLeft_micrometers")+ ylim(c(min_WAL, max_WAL))+ droseu_theme
## quartz_off_screen
## 2
p_WA_M_L_pop_Onder <- ggplot(data = (subset(d_WA_M,Supervisor.PI=='Onder')), aes(x=Population_Lat, y=CentroidSizeLeft_micrometers, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_WA_M_L_pop_Onder", x="Population", y = "CentroidSizeLeft_micrometers") + ylim(c(min_WAL, max_WAL))+ droseu_theme
## quartz_off_screen
## 2
WA_F_L_Posnien_lmer <- lmer(CentroidSizeLeft_micrometers ~ -1 + Population + (1|Line:Population) +
(1|ReplicateVial : Line : Population), data = (subset(d_WA_F,Supervisor.PI=='Posnien')))
## Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
## unable to evaluate scaled gradient
## Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
## Model failed to converge: degenerate Hessian with 1 negative eigenvalues
capture.output(summary(WA_F_L_Posnien_lmer),file = "WingArea/WA_F_L_Posnien_sum.txt")
capture.output(anova(WA_F_L_Posnien_lmer),file = "WingArea/WA_F_L_Posnien_lmer.txt")
capture.output(emmeans(WA_F_L_Posnien_lmer, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "WingArea/WA_F_L_Posnien_lmer_tk.txt")
anova(WA_F_L_Posnien_lmer)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 184927442 20547494 9 18 2460.7 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(WA_F_L_Posnien_lmer)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula:
## CentroidSizeLeft_micrometers ~ -1 + Population + (1 | Line:Population) +
## (1 | ReplicateVial:Line:Population)
## Data: (subset(d_WA_F, Supervisor.PI == "Posnien"))
##
## REML criterion at convergence: 3169.9
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.3762 -0.5835 -0.0034 0.6637 2.5365
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 432.2 20.79
## ReplicateVial:Line:Population (Intercept) 7243.4 85.11
## Residual 8350.2 91.38
## Number of obs: 270, groups:
## Line:Population, 27; ReplicateVial:Line:Population, 27
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 2589.01 53.26 18.00 48.61 <2e-16 ***
## PopulationGI 2728.20 53.26 18.00 51.22 <2e-16 ***
## PopulationKA 2639.38 53.26 18.00 49.55 <2e-16 ***
## PopulationMA 2658.50 53.26 18.00 49.91 <2e-16 ***
## PopulationMU 2563.45 53.26 18.00 48.13 <2e-16 ***
## PopulationRE 2723.93 53.26 18.00 51.14 <2e-16 ***
## PopulationUM 2663.03 53.26 18.00 50.00 <2e-16 ***
## PopulationVA 2549.58 53.26 18.00 47.87 <2e-16 ***
## PopulationYE 2657.72 53.26 18.00 49.90 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.000
## PopulatinKA 0.000 0.000
## PopulatinMA 0.000 0.000 0.000
## PopulatinMU 0.000 0.000 0.000 0.000
## PopulatinRE 0.000 0.000 0.000 0.000 0.000
## PopulatinUM 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinVA 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinYE 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## optimizer (nloptwrap) convergence code: 0 (OK)
## unable to evaluate scaled gradient
## Model failed to converge: degenerate Hessian with 1 negative eigenvalues
WA_M_L_Posnien_lmer <- lmer(CentroidSizeLeft_micrometers ~ -1 + Population + (1|Line:Population) +
(1|ReplicateVial : Line : Population), data = (subset(d_WA_M,Supervisor.PI=='Posnien')))
## Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
## unable to evaluate scaled gradient
## Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
## Model failed to converge: degenerate Hessian with 1 negative eigenvalues
## Warning: Model failed to converge with 1 negative eigenvalue: -2.6e-05
capture.output(summary(WA_M_L_Posnien_lmer),file = "WingArea/WA_M_L_Posnien_sum.txt")
capture.output(anova(WA_M_L_Posnien_lmer),file = "WingArea/WA_M_L_Posnien_lmer.txt")
capture.output(emmeans(WA_M_L_Posnien_lmer, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "WingArea/WA_F_L_Posnien_lmer_tk.txt")
anova(WA_M_L_Posnien_lmer)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 120639111 13404346 9 18 2235.9 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(WA_M_L_Posnien_lmer)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula:
## CentroidSizeLeft_micrometers ~ -1 + Population + (1 | Line:Population) +
## (1 | ReplicateVial:Line:Population)
## Data: (subset(d_WA_M, Supervisor.PI == "Posnien"))
##
## REML criterion at convergence: 3086.8
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.9072 -0.4977 0.0192 0.6488 3.4055
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 65.11 8.069
## ReplicateVial:Line:Population (Intercept) 6715.55 81.948
## Residual 5995.06 77.428
## Number of obs: 270, groups:
## Line:Population, 27; ReplicateVial:Line:Population, 27
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 2300.0 49.6 18.0 46.37 <2e-16 ***
## PopulationGI 2411.8 49.6 18.0 48.63 <2e-16 ***
## PopulationKA 2332.6 49.6 18.0 47.03 <2e-16 ***
## PopulationMA 2381.3 49.6 18.0 48.01 <2e-16 ***
## PopulationMU 2266.6 49.6 18.0 45.70 <2e-16 ***
## PopulationRE 2374.9 49.6 18.0 47.88 <2e-16 ***
## PopulationUM 2348.3 49.6 18.0 47.35 <2e-16 ***
## PopulationVA 2339.7 49.6 18.0 47.17 <2e-16 ***
## PopulationYE 2349.2 49.6 18.0 47.36 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.000
## PopulatinKA 0.000 0.000
## PopulatinMA 0.000 0.000 0.000
## PopulatinMU 0.000 0.000 0.000 0.000
## PopulatinRE 0.000 0.000 0.000 0.000 0.000
## PopulatinUM 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinVA 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinYE 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## optimizer (nloptwrap) convergence code: 0 (OK)
## unable to evaluate scaled gradient
## Model failed to converge: degenerate Hessian with 1 negative eigenvalues
p_WA_F_L_Posnien <- ggplot(data = (subset(d_WA_F,Supervisor.PI=='Posnien')), aes(x=Population_Lat, y=CentroidSizeLeft_micrometers, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_WA_F_L_Posnien", x="Population", y = "CentroidSizeLeft_micrometers") + ylim(c(min_WAL, max_WAL))+ droseu_theme
## quartz_off_screen
## 2
p_WA_F_L_pop_Posnien <- ggplot(data = (subset(d_WA_F,Supervisor.PI=='Posnien')), aes(x=Population_Lat, y=CentroidSizeLeft_micrometers, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_WA_F_L_pop_Posnien", x="Population", y = "CentroidSizeLeft_micrometers")+ ylim(c(min_WAL, max_WAL))+ droseu_theme
## quartz_off_screen
## 2
p_WA_M_L_Posnien <- ggplot(data = (subset(d_WA_M,Supervisor.PI=='Posnien')), aes(x=Population_Lat, y=CentroidSizeLeft_micrometers, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_WA_M_L_Posnien", x="Population", y = "CentroidSizeLeft_micrometers")+ ylim(c(min_WAL, max_WAL))+ droseu_theme
## quartz_off_screen
## 2
p_WA_M_L_pop_Posnien <- ggplot(data = (subset(d_WA_M,Supervisor.PI=='Posnien')), aes(x=Population_Lat, y=CentroidSizeLeft_micrometers, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_WA_M_L_pop_Posnien", x="Population", y = "CentroidSizeLeft_micrometers")+ ylim(c(min_WAL, max_WAL))+ droseu_theme
## quartz_off_screen
## 2
WA_F_L_Ritchie_lmer <- lmer(CentroidSizeLeft_micrometers ~ -1 + Population + (1|Line:Population) +
(1|Batch) + (1|ReplicateVial : Line : Population), data = (subset(d_WA_F,Supervisor.PI=='Ritchie')))
capture.output(summary(WA_F_L_Ritchie_lmer),file = "WingArea/WA_F_L_Ritchie_sum.txt")
capture.output(anova(WA_F_L_Ritchie_lmer),file = "WingArea/WA_F_L_Ritchie_lmer.txt")
capture.output(emmeans(WA_F_L_Ritchie_lmer, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "WingArea/WA_F_L_Ritchie_lmer_tk.txt")
anova(WA_F_L_Ritchie_lmer)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 120238982 13359887 9 24.415 1522 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(WA_F_L_Ritchie_lmer)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula:
## CentroidSizeLeft_micrometers ~ -1 + Population + (1 | Line:Population) +
## (1 | Batch) + (1 | ReplicateVial:Line:Population)
## Data: (subset(d_WA_F, Supervisor.PI == "Ritchie"))
##
## REML criterion at convergence: 16563.6
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -5.3958 -0.5231 0.0337 0.6233 3.1535
##
## Random effects:
## Groups Name Variance Std.Dev.
## ReplicateVial:Line:Population (Intercept) 6184 78.64
## Line:Population (Intercept) 17974 134.07
## Batch (Intercept) 1663 40.79
## Residual 8778 93.69
## Number of obs: 1367, groups:
## ReplicateVial:Line:Population, 132; Line:Population, 47; Batch, 15
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 2759.24 74.08 27.97 37.24 <2e-16 ***
## PopulationGI 2587.18 56.41 22.96 45.86 <2e-16 ***
## PopulationKA 2714.14 73.97 27.72 36.69 <2e-16 ***
## PopulationMA 2846.67 66.22 27.51 42.99 <2e-16 ***
## PopulationMU 2782.90 66.15 27.67 42.07 <2e-16 ***
## PopulationRE 2878.60 66.08 27.75 43.56 <2e-16 ***
## PopulationUM 2889.01 66.15 27.71 43.67 <2e-16 ***
## PopulationVA 2774.25 66.16 27.77 41.93 <2e-16 ***
## PopulationYE 2782.82 66.14 27.83 42.08 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.056
## PopulatinKA 0.000 0.000
## PopulatinMA 0.000 0.000 0.066
## PopulatinMU 0.001 0.001 0.050 0.060
## PopulatinRE 0.001 0.001 0.033 0.030 0.017
## PopulatinUM 0.002 0.003 0.002 0.002 0.015 0.045
## PopulatinVA 0.017 0.013 0.002 0.001 0.002 0.045 0.059
## PopulatinYE 0.035 0.064 0.001 0.001 0.015 0.002 0.029 0.017
WA_M_L_Ritchie_lmer <- lmer(CentroidSizeLeft_micrometers ~ -1 + Population + (1|Line:Population) +
(1|Batch) + (1|ReplicateVial : Line : Population), data = (subset(d_WA_M,Supervisor.PI=='Ritchie')))
capture.output(summary(WA_M_L_Ritchie_lmer),file = "WingArea/WA_M_L_Ritchie_sum.txt")
capture.output(anova(WA_M_L_Ritchie_lmer),file = "WingArea/WA_M_L_Ritchie_lmer.txt")
capture.output(emmeans(WA_M_L_Ritchie_lmer, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "WingArea/WA_M_L_Ritchie_lmer_tk.txt")
anova(WA_M_L_Ritchie_lmer)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 177892587 19765843 9 22.802 2847.6 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(WA_M_L_Ritchie_lmer)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula:
## CentroidSizeLeft_micrometers ~ -1 + Population + (1 | Line:Population) +
## (1 | Batch) + (1 | ReplicateVial:Line:Population)
## Data: (subset(d_WA_M, Supervisor.PI == "Ritchie"))
##
## REML criterion at convergence: 16229.6
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -4.9391 -0.4829 0.0696 0.5871 4.6442
##
## Random effects:
## Groups Name Variance Std.Dev.
## ReplicateVial:Line:Population (Intercept) 4539.9 67.38
## Line:Population (Intercept) 6325.9 79.54
## Batch (Intercept) 740.4 27.21
## Residual 6941.1 83.31
## Number of obs: 1368, groups:
## ReplicateVial:Line:Population, 132; Line:Population, 44; Batch, 15
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 2448.31 46.86 35.17 52.25 <2e-16 ***
## PopulationGI 2383.26 41.92 34.95 56.85 <2e-16 ***
## PopulationKA 2425.85 41.94 35.01 57.84 <2e-16 ***
## PopulationMA 2478.01 41.91 34.92 59.12 <2e-16 ***
## PopulationMU 2436.41 41.85 35.01 58.21 <2e-16 ***
## PopulationRE 2495.99 41.75 34.81 59.78 <2e-16 ***
## PopulationUM 2511.63 41.87 35.08 59.99 <2e-16 ***
## PopulationVA 2432.26 41.88 35.14 58.08 <2e-16 ***
## PopulationYE 2413.16 41.87 35.16 57.64 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.073
## PopulatinKA 0.000 0.000
## PopulatinMA 0.000 0.000 0.081
## PopulatinMU 0.001 0.001 0.067 0.067
## PopulatinRE 0.001 0.001 0.034 0.034 0.019
## PopulatinUM 0.002 0.003 0.003 0.003 0.017 0.050
## PopulatinVA 0.019 0.018 0.002 0.002 0.002 0.050 0.065
## PopulatinYE 0.039 0.051 0.001 0.001 0.016 0.003 0.033 0.019
p_WA_F_L_Ritchie <- ggplot(data = (subset(d_WA_F,Supervisor.PI=='Ritchie')), aes(x=Population_Lat, y=CentroidSizeLeft_micrometers, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_WA_F_L_Ritchie", x="Population", y = "CentroidSizeLeft_micrometers")+ ylim(c(min_WAL, max_WAL))+ droseu_theme
## quartz_off_screen
## 2
p_WA_F_L_pop_Ritchie <- ggplot(data = (subset(d_WA_F,Supervisor.PI=='Ritchie')), aes(x=Population_Lat, y=CentroidSizeLeft_micrometers, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_WA_F_L_pop_Ritchie", x="Population", y = "CentroidSizeLeft_micrometers")+ ylim(c(min_WAL, max_WAL))+ droseu_theme
## quartz_off_screen
## 2
p_WA_M_L_Ritchie <- ggplot(data = (subset(d_WA_M,Supervisor.PI=='Ritchie')), aes(x=Population_Lat, y=CentroidSizeLeft_micrometers, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_WA_M_L_Ritchie", x="Population", y = "CentroidSizeLeft_micrometers") + ylim(c(min_WAL, max_WAL))+ droseu_theme
## quartz_off_screen
## 2
p_WA_M_L_pop_Ritchie <- ggplot(data = (subset(d_WA_M,Supervisor.PI=='Ritchie')), aes(x=Population_Lat, y=CentroidSizeLeft_micrometers, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_WA_M_L_pop_Ritchie", x="Population", y = "CentroidSizeLeft_micrometers") + ylim(c(min_WAL, max_WAL))+ droseu_theme
## quartz_off_screen
## 2
WA_F_L_StamenkovicRadak_lmer <- lmer(CentroidSizeLeft_micrometers ~ -1 + Population + (1|Line:Population) +
(1|Batch) + (1|ReplicateVial : Line : Population), data = (subset(d_WA_F,Supervisor.PI=='StamenkovicRadak')))
## boundary (singular) fit: see ?isSingular
## Warning: Model failed to converge with 1 negative eigenvalue: -7.2e-03
capture.output(summary(WA_F_L_StamenkovicRadak_lmer),file = "WingArea/WA_F_L_StamenkovicRadak_sum.txt")
capture.output(anova(WA_F_L_StamenkovicRadak_lmer),file = "WingArea/WA_F_L_StamenkovicRadak_lmer.txt")
capture.output(emmeans(WA_F_L_StamenkovicRadak_lmer, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "WingArea/WA_F_L_StamenkovicRadak_lmer_tk.txt")
anova(WA_F_L_StamenkovicRadak_lmer)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 2879060673 319895630 9 114.59 41324 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(WA_F_L_StamenkovicRadak_lmer)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula:
## CentroidSizeLeft_micrometers ~ -1 + Population + (1 | Line:Population) +
## (1 | Batch) + (1 | ReplicateVial:Line:Population)
## Data: (subset(d_WA_F, Supervisor.PI == "StamenkovicRadak"))
##
## REML criterion at convergence: 44876.4
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -5.4785 -0.5666 0.0599 0.6399 3.6361
##
## Random effects:
## Groups Name Variance Std.Dev.
## ReplicateVial:Line:Population (Intercept) 6.451 2.54
## Line:Population (Intercept) 2434.129 49.34
## Batch (Intercept) 0.000 0.00
## Residual 7741.151 87.98
## Number of obs: 3787, groups:
## ReplicateVial:Line:Population, 124; Line:Population, 124; Batch, 5
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 2780.82 12.95 113.51 214.7 <2e-16 ***
## PopulationGI 2836.04 16.43 114.87 172.6 <2e-16 ***
## PopulationKA 2810.31 13.01 115.62 216.0 <2e-16 ***
## PopulationMA 2862.63 15.67 115.06 182.6 <2e-16 ***
## PopulationMU 2847.78 13.35 112.79 213.2 <2e-16 ***
## PopulationRE 2932.82 14.41 114.82 203.5 <2e-16 ***
## PopulationUM 2882.97 13.92 115.85 207.1 <2e-16 ***
## PopulationVA 2838.45 13.40 114.48 211.7 <2e-16 ***
## PopulationYE 2822.12 13.87 114.42 203.4 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.000
## PopulatinKA 0.000 0.000
## PopulatinMA 0.000 0.000 0.000
## PopulatinMU 0.000 0.000 0.000 0.000
## PopulatinRE 0.000 0.000 0.000 0.000 0.000
## PopulatinUM 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinVA 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinYE 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## optimizer (nloptwrap) convergence code: 0 (OK)
## boundary (singular) fit: see ?isSingular
WA_M_L_StamenkovicRadak_lmer <- lmer(CentroidSizeLeft_micrometers ~ -1 + Population + (1|Line:Population) +
(1|Batch) + (1|ReplicateVial : Line : Population), data = (subset(d_WA_M,Supervisor.PI=='StamenkovicRadak')))
## Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
## unable to evaluate scaled gradient
## Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
## Model failed to converge: degenerate Hessian with 1 negative eigenvalues
## Warning: Model failed to converge with 1 negative eigenvalue: -1.2e-03
capture.output(summary(WA_M_L_StamenkovicRadak_lmer),file = "WingArea/WA_M_L_StamenkovicRadak_sum.txt")
capture.output(anova(WA_M_L_StamenkovicRadak_lmer),file = "WingArea/WA_M_L_StamenkovicRadak_lmer.txt")
capture.output(emmeans(WA_M_L_StamenkovicRadak_lmer, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "WingArea/WA_M_L_StamenkovicRadak_lmer_tk.txt")
anova(WA_M_L_StamenkovicRadak_lmer)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 1.992e+09 221338867 9 60.345 36999 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(WA_M_L_StamenkovicRadak_lmer)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula:
## CentroidSizeLeft_micrometers ~ -1 + Population + (1 | Line:Population) +
## (1 | Batch) + (1 | ReplicateVial:Line:Population)
## Data: (subset(d_WA_M, Supervisor.PI == "StamenkovicRadak"))
##
## REML criterion at convergence: 42455.7
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -7.2393 -0.5570 0.0480 0.6236 6.0054
##
## Random effects:
## Groups Name Variance Std.Dev.
## ReplicateVial:Line:Population (Intercept) 0.3221 0.5675
## Line:Population (Intercept) 1857.6982 43.1010
## Batch (Intercept) 6.6839 2.5853
## Residual 5982.2379 77.3449
## Number of obs: 3662, groups:
## ReplicateVial:Line:Population, 124; Line:Population, 124; Batch, 5
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 2415.63 11.41 58.45 211.7 <2e-16 ***
## PopulationGI 2472.14 14.42 88.81 171.4 <2e-16 ***
## PopulationKA 2434.72 11.45 70.34 212.7 <2e-16 ***
## PopulationMA 2490.11 13.76 91.97 181.0 <2e-16 ***
## PopulationMU 2468.42 11.76 70.58 209.9 <2e-16 ***
## PopulationRE 2537.58 12.70 80.56 199.8 <2e-16 ***
## PopulationUM 2507.21 12.23 77.98 205.0 <2e-16 ***
## PopulationVA 2461.46 11.81 66.21 208.5 <2e-16 ***
## PopulationYE 2447.49 12.22 77.61 200.3 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.010
## PopulatinKA 0.013 0.010
## PopulatinMA 0.009 0.008 0.010
## PopulatinMU 0.013 0.009 0.012 0.009
## PopulatinRE 0.012 0.008 0.011 0.008 0.012
## PopulatinUM 0.011 0.009 0.012 0.009 0.012 0.011
## PopulatinVA 0.014 0.010 0.012 0.009 0.013 0.011 0.011
## PopulatinYE 0.012 0.009 0.012 0.009 0.012 0.011 0.011 0.012
## optimizer (nloptwrap) convergence code: 0 (OK)
## unable to evaluate scaled gradient
## Model failed to converge: degenerate Hessian with 1 negative eigenvalues
p_WA_F_L_StamenkovicRadak <- ggplot(data = (subset(d_WA_F,Supervisor.PI=='StamenkovicRadak')), aes(x=Population_Lat, y=CentroidSizeLeft_micrometers, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_WA_F_L_StamenkovicRadak", x="Population", y = "CentroidSizeLeft_micrometers")+ ylim(c(min_WAL, max_WAL))+ droseu_theme
## quartz_off_screen
## 2
p_WA_F_L_pop_StamenkovicRadak <- ggplot(data = (subset(d_WA_F,Supervisor.PI=='StamenkovicRadak')), aes(x=Population_Lat, y=CentroidSizeLeft_micrometers, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_WA_F_L_pop_StamenkovicRadak", x="Population", y = "CentroidSizeLeft_micrometers")+ ylim(c(min_WAL, max_WAL))+ droseu_theme
## quartz_off_screen
## 2
p_WA_M_L_StamenkovicRadak <- ggplot(data = (subset(d_WA_M,Supervisor.PI=='StamenkovicRadak')), aes(x=Population_Lat, y=CentroidSizeLeft_micrometers, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_WA_M_L_StamenkovicRadak", x="Population", y = "CentroidSizeLeft_micrometers") + ylim(c(min_WAL, max_WAL))+ droseu_theme
## quartz_off_screen
## 2
p_WA_M_L_pop_StamenkovicRadak <- ggplot(data = (subset(d_WA_M,Supervisor.PI=='StamenkovicRadak')), aes(x=Population_Lat, y=CentroidSizeLeft_micrometers, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_WA_M_L_pop_StamenkovicRadak", x="Population", y = "CentroidSizeLeft_micrometers") + ylim(c(min_WAL, max_WAL))+ droseu_theme
## quartz_off_screen
## 2
Descriptive statistics at the line level, with batch information :
Descriptive statistics at the line level, without batch information :
Descriptive statistics at the population level, with batch information :
Descriptive statistics at the population level, without batch information :
min_WAR <- min(d_WA$CentroidSizeRight_micrometers)
max_WAR <- max(d_WA$CentroidSizeRight_micrometers)
p_WA_F_R <- ggplot(data = d_WA_F, aes(x=Population_Lat, y=CentroidSizeRight_micrometers, fill=Supervisor.PI)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_WA_F_R", x="Population", y = "CentroidSizeRight_micrometers") + ylim(c(min_WAL, max_WAL))+ droseu_theme
## Warning: Removed 2 rows containing non-finite values (stat_boxplot).
## Warning: Removed 2 rows containing non-finite values (stat_boxplot).
## quartz_off_screen
## 2
p_WA_M_R <- ggplot(data = d_WA_M, aes(x=Population_Lat, y=CentroidSizeRight_micrometers, fill=Supervisor.PI)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_WA_M_R", x="Population", y = "CentroidSizeRight_micrometers")+ ylim(c(min_WAL, max_WAL))+ droseu_theme
## Warning: Removed 1 rows containing non-finite values (stat_boxplot).
## Warning: Removed 1 rows containing non-finite values (stat_boxplot).
## quartz_off_screen
## 2
for (i in dev.list()[1]:dev.list()[length(dev.list())]) {
dev.off()
}
# crashed bc tries to save lots -- need to remove some
WA_F_R_Onder_lmer <- lmer(CentroidSizeRight_micrometers ~ -1 + Population + (1|Line:Population) +
(1|Batch) + (1|ReplicateVial : Line : Population), data = (subset(d_WA_F,Supervisor.PI=='Onder')))
capture.output(summary(WA_F_R_Onder_lmer),file = "WingArea/WA_F_R_Onder_sum.txt")
capture.output(anova(WA_F_R_Onder_lmer),file = "WingArea/WA_F_R_Onder_lmer.txt")
capture.output(emmeans(WA_F_R_Onder_lmer, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "WingArea/WA_F_R_Onder_lmer_tk.txt")
anova(WA_F_R_Onder_lmer)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 254276248 28252916 9 24.56 4858.7 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(WA_F_R_Onder_lmer)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula:
## CentroidSizeRight_micrometers ~ -1 + Population + (1 | Line:Population) +
## (1 | Batch) + (1 | ReplicateVial:Line:Population)
## Data: (subset(d_WA_F, Supervisor.PI == "Onder"))
##
## REML criterion at convergence: 61106
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -5.6211 -0.5609 0.0470 0.6255 3.7505
##
## Random effects:
## Groups Name Variance Std.Dev.
## ReplicateVial:Line:Population (Intercept) 806.7 28.40
## Line:Population (Intercept) 3014.8 54.91
## Batch (Intercept) 1097.1 33.12
## Residual 5814.9 76.26
## Number of obs: 5247, groups:
## ReplicateVial:Line:Population, 518; Line:Population, 167; Batch, 7
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 2815.32 18.58 15.46 151.5 <2e-16 ***
## PopulationGI 2854.81 20.16 20.71 141.6 <2e-16 ***
## PopulationKA 2860.05 18.63 15.57 153.5 <2e-16 ***
## PopulationMA 2899.67 18.67 15.65 155.3 <2e-16 ***
## PopulationMU 2860.41 18.38 15.02 155.6 <2e-16 ***
## PopulationRE 2944.63 19.71 19.16 149.4 <2e-16 ***
## PopulationUM 2901.85 19.28 17.80 150.5 <2e-16 ***
## PopulationVA 2845.20 18.55 15.33 153.4 <2e-16 ***
## PopulationYE 2815.71 18.71 15.92 150.5 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.449
## PopulatinKA 0.468 0.448
## PopulatinMA 0.498 0.451 0.470
## PopulatinMU 0.485 0.443 0.478 0.487
## PopulatinRE 0.454 0.426 0.460 0.453 0.457
## PopulatinUM 0.455 0.429 0.469 0.454 0.459 0.442
## PopulatinVA 0.487 0.452 0.489 0.490 0.488 0.461 0.465
## PopulatinYE 0.481 0.445 0.478 0.482 0.480 0.455 0.459 0.485
WA_M_R_Onder_lmer <- lmer(CentroidSizeRight_micrometers ~ -1 + Population + (1|Line:Population) +
(1|Batch) + (1|ReplicateVial : Line : Population), data = (subset(d_WA_M,Supervisor.PI=='Onder')))
capture.output(summary(WA_M_R_Onder_lmer),file = "WingArea/WA_M_R_Onder_sum.txt")
capture.output(anova(WA_M_R_Onder_lmer),file = "WingArea/WA_M_R_Onder_lmer.txt")
capture.output(emmeans(WA_M_R_Onder_lmer, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "WingArea/WA_M_R_Onder_lmer_tk.txt")
anova(WA_M_R_Onder_lmer)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 469778882 52197654 9 27.622 11136 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(WA_M_R_Onder_lmer)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula:
## CentroidSizeRight_micrometers ~ -1 + Population + (1 | Line:Population) +
## (1 | Batch) + (1 | ReplicateVial:Line:Population)
## Data: (subset(d_WA_M, Supervisor.PI == "Onder"))
##
## REML criterion at convergence: 59827.3
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -4.1368 -0.5848 0.0327 0.6114 6.0665
##
## Random effects:
## Groups Name Variance Std.Dev.
## ReplicateVial:Line:Population (Intercept) 874.6 29.57
## Line:Population (Intercept) 2102.5 45.85
## Batch (Intercept) 282.9 16.82
## Residual 4687.4 68.46
## Number of obs: 5230, groups:
## ReplicateVial:Line:Population, 518; Line:Population, 167; Batch, 7
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 2444.99 13.29 35.83 184.0 <2e-16 ***
## PopulationGI 2477.84 14.87 50.37 166.6 <2e-16 ***
## PopulationKA 2481.34 13.34 35.75 186.1 <2e-16 ***
## PopulationMA 2509.80 13.37 35.50 187.7 <2e-16 ***
## PopulationMU 2479.30 13.11 36.10 189.2 <2e-16 ***
## PopulationRE 2547.09 14.46 47.19 176.1 <2e-16 ***
## PopulationUM 2513.79 14.02 43.85 179.3 <2e-16 ***
## PopulationVA 2489.41 13.25 35.41 187.9 <2e-16 ***
## PopulationYE 2441.24 13.44 38.10 181.7 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.238
## PopulatinKA 0.243 0.237
## PopulatinMA 0.281 0.241 0.246
## PopulatinMU 0.262 0.230 0.253 0.265
## PopulatinRE 0.238 0.222 0.246 0.238 0.240
## PopulatinUM 0.235 0.222 0.253 0.235 0.238 0.232
## PopulatinVA 0.265 0.241 0.269 0.270 0.265 0.246 0.246
## PopulatinYE 0.260 0.235 0.257 0.262 0.257 0.240 0.241 0.264
p_WA_F_R_Onder <- ggplot(data = (subset(d_WA_F,Supervisor.PI=='Onder')), aes(x=Population_Lat, y=CentroidSizeRight_micrometers, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_WA_F_Onder_R", x="Population", y = "CentroidSizeRight_micrometers")+ ylim(c(min_WAR, max_WAR))+ droseu_theme
## quartz_off_screen
## 2
p_WA_F_R_pop_Onder <- ggplot(data = (subset(d_WA_F,Supervisor.PI=='Onder')), aes(x=Population_Lat, y=CentroidSizeRight_micrometers, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_WA_F_R_pop_Onder", x="Population", y = "CentroidSizeRight_micrometers") + ylim(c(min_WAR, max_WAR))+ droseu_theme
## quartz_off_screen
## 2
p_WA_M_R_Onder <- ggplot(data = (subset(d_WA_M,Supervisor.PI=='Onder')), aes(x=Population_Lat, y=CentroidSizeRight_micrometers, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_WA_M_R_Onder", x="Population", y = "CentroidSizeRight_micrometers") + ylim(c(min_WAR, max_WAR))+ droseu_theme
## quartz_off_screen
## 2
p_WA_M_R_pop_Onder <- ggplot(data = (subset(d_WA_M,Supervisor.PI=='Onder')), aes(x=Population_Lat, y=CentroidSizeRight_micrometers, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_WA_M_R_pop_Onder", x="Population", y = "CentroidSizeRight_micrometers") + ylim(c(min_WAR, max_WAR))+ droseu_theme
## quartz_off_screen
## 2
WA_F_R_Posnien_lmer <- lmer(CentroidSizeRight_micrometers ~ -1 + Population + (1|Line:Population) +
(1|ReplicateVial : Line : Population), data = (subset(d_WA_F,Supervisor.PI=='Posnien')))
## Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
## unable to evaluate scaled gradient
## Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
## Model failed to converge: degenerate Hessian with 1 negative eigenvalues
## Warning: Model failed to converge with 1 negative eigenvalue: -1.1e-04
capture.output(summary(WA_F_R_Posnien_lmer),file = "WingArea/WA_F_R_Posnien_sum.txt")
capture.output(anova(WA_F_R_Posnien_lmer),file = "WingArea/WA_F_R_Posnien_lmer.txt")
capture.output(emmeans(WA_F_R_Posnien_lmer, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "WingArea/WA_F_R_Posnien_lmer_tk.txt")
anova(WA_F_R_Posnien_lmer)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 189666658 21074073 9 18 2424.1 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(WA_F_R_Posnien_lmer)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula:
## CentroidSizeRight_micrometers ~ -1 + Population + (1 | Line:Population) +
## (1 | ReplicateVial:Line:Population)
## Data: (subset(d_WA_F, Supervisor.PI == "Posnien"))
##
## REML criterion at convergence: 3180
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.88515 -0.60816 0.01116 0.64507 2.45427
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 718.1 26.80
## ReplicateVial:Line:Population (Intercept) 7037.2 83.89
## Residual 8693.5 93.24
## Number of obs: 270, groups:
## Line:Population, 27; ReplicateVial:Line:Population, 27
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 2584.98 53.62 18.00 48.21 <2e-16 ***
## PopulationGI 2725.24 53.62 18.00 50.83 <2e-16 ***
## PopulationKA 2637.33 53.62 18.00 49.19 <2e-16 ***
## PopulationMA 2657.28 53.62 18.00 49.56 <2e-16 ***
## PopulationMU 2562.32 53.62 18.00 47.79 <2e-16 ***
## PopulationRE 2720.04 53.62 18.00 50.73 <2e-16 ***
## PopulationUM 2660.50 53.62 18.00 49.62 <2e-16 ***
## PopulationVA 2547.93 53.62 18.00 47.52 <2e-16 ***
## PopulationYE 2657.20 53.62 18.00 49.56 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.000
## PopulatinKA 0.000 0.000
## PopulatinMA 0.000 0.000 0.000
## PopulatinMU 0.000 0.000 0.000 0.000
## PopulatinRE 0.000 0.000 0.000 0.000 0.000
## PopulatinUM 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinVA 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinYE 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## optimizer (nloptwrap) convergence code: 0 (OK)
## unable to evaluate scaled gradient
## Model failed to converge: degenerate Hessian with 1 negative eigenvalues
WA_M_R_Posnien_lmer <- lmer(CentroidSizeRight_micrometers ~ -1 + Population + (1|Line:Population) +
(1|ReplicateVial : Line : Population), data = (subset(d_WA_M,Supervisor.PI=='Posnien')))
capture.output(summary(WA_M_R_Posnien_lmer),file = "WingArea/WA_M_R_Posnien_sum.txt")
capture.output(anova(WA_M_R_Posnien_lmer),file = "WingArea/WA_M_R_Posnien_lmer.txt")
capture.output(emmeans(WA_M_R_Posnien_lmer, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "WingArea/WA_M_R_Posnien_lmer_tk.txt")
anova(WA_M_R_Posnien_lmer)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 118227620 13136402 9 18 2177.8 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(WA_M_R_Posnien_lmer)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula:
## CentroidSizeRight_micrometers ~ -1 + Population + (1 | Line:Population) +
## (1 | ReplicateVial:Line:Population)
## Data: (subset(d_WA_M, Supervisor.PI == "Posnien"))
##
## REML criterion at convergence: 3088.8
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -4.0851 -0.5566 -0.0153 0.6569 3.5274
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 38.41 6.198
## ReplicateVial:Line:Population (Intercept) 6927.30 83.230
## Residual 6032.05 77.666
## Number of obs: 270, groups:
## Line:Population, 27; ReplicateVial:Line:Population, 27
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 2296.73 50.23 18.00 45.73 <2e-16 ***
## PopulationGI 2405.06 50.23 18.00 47.88 <2e-16 ***
## PopulationKA 2331.64 50.23 18.00 46.42 <2e-16 ***
## PopulationMA 2382.90 50.23 18.00 47.44 <2e-16 ***
## PopulationMU 2273.85 50.23 18.00 45.27 <2e-16 ***
## PopulationRE 2374.99 50.23 18.00 47.28 <2e-16 ***
## PopulationUM 2349.13 50.23 18.00 46.77 <2e-16 ***
## PopulationVA 2334.22 50.23 18.00 46.47 <2e-16 ***
## PopulationYE 2344.77 50.23 18.00 46.68 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.000
## PopulatinKA 0.000 0.000
## PopulatinMA 0.000 0.000 0.000
## PopulatinMU 0.000 0.000 0.000 0.000
## PopulatinRE 0.000 0.000 0.000 0.000 0.000
## PopulatinUM 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinVA 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinYE 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
p_WA_F_R_Posnien <- ggplot(data = (subset(d_WA_F,Supervisor.PI=='Posnien')), aes(x=Population_Lat, y=CentroidSizeRight_micrometers, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_WA_F_R_Posnien", x="Population", y = "CentroidSizeRight_micrometers") + ylim(c(min_WAR, max_WAR))+ droseu_theme
## quartz_off_screen
## 2
p_WA_F_R_pop_Posnien <- ggplot(data = (subset(d_WA_F,Supervisor.PI=='Posnien')), aes(x=Population_Lat, y=CentroidSizeRight_micrometers, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_WA_F_R_pop_Posnien", x="Population", y = "CentroidSizeRight_micrometers")+ ylim(c(min_WAR, max_WAR))+ droseu_theme
## quartz_off_screen
## 2
p_WA_M_R_Posnien <- ggplot(data = (subset(d_WA_M,Supervisor.PI=='Posnien')), aes(x=Population_Lat, y=CentroidSizeRight_micrometers, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_WA_M_R_Posnien", x="Population", y = "CentroidSizeRight_micrometers") + ylim(c(min_WAR, max_WAR))+ droseu_theme
## quartz_off_screen
## 2
p_WA_M_R_pop_Posnien <- ggplot(data = (subset(d_WA_M,Supervisor.PI=='Posnien')), aes(x=Population_Lat, y=CentroidSizeRight_micrometers, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_WA_M_R_pop_Posnien", x="Population", y = "CentroidSizeRight_micrometers") + ylim(c(min_WAR, max_WAR))+ droseu_theme
## quartz_off_screen
## 2
WA_F_R_Ritchie_lmer <- lmer(CentroidSizeRight_micrometers ~ -1 + Population + (1|Line:Population) +
(1|Batch) + (1|ReplicateVial : Line : Population), data = (subset(d_WA_F,Supervisor.PI=='Ritchie')))
capture.output(summary(WA_F_R_Ritchie_lmer),file = "WingArea/WA_F_R_Ritchie_sum.txt")
capture.output(anova(WA_F_R_Ritchie_lmer),file = "WingArea/WA_F_R_Ritchie_lmer.txt")
capture.output(emmeans(WA_F_R_Ritchie_lmer, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "WingArea/WA_F_R_Ritchie_lmer_tk.txt")
anova(WA_F_R_Ritchie_lmer)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 124267590 13807510 9 24.263 1575.7 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(WA_F_R_Ritchie_lmer)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula:
## CentroidSizeRight_micrometers ~ -1 + Population + (1 | Line:Population) +
## (1 | Batch) + (1 | ReplicateVial:Line:Population)
## Data: (subset(d_WA_F, Supervisor.PI == "Ritchie"))
##
## REML criterion at convergence: 16564.4
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -5.4488 -0.5249 0.0615 0.6440 3.1927
##
## Random effects:
## Groups Name Variance Std.Dev.
## ReplicateVial:Line:Population (Intercept) 6492 80.58
## Line:Population (Intercept) 17468 132.17
## Batch (Intercept) 1632 40.39
## Residual 8763 93.61
## Number of obs: 1367, groups:
## ReplicateVial:Line:Population, 132; Line:Population, 47; Batch, 15
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 2777.36 73.35 27.73 37.86 <2e-16 ***
## PopulationGI 2611.67 55.96 23.04 46.67 <2e-16 ***
## PopulationKA 2731.85 73.24 27.47 37.30 <2e-16 ***
## PopulationMA 2875.40 65.56 27.27 43.86 <2e-16 ***
## PopulationMU 2805.69 65.49 27.42 42.84 <2e-16 ***
## PopulationRE 2896.22 65.42 27.50 44.27 <2e-16 ***
## PopulationUM 2913.64 65.49 27.47 44.49 <2e-16 ***
## PopulationVA 2794.00 65.50 27.52 42.66 <2e-16 ***
## PopulationYE 2797.38 65.48 27.59 42.72 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.056
## PopulatinKA 0.000 0.000
## PopulatinMA 0.000 0.000 0.066
## PopulatinMU 0.001 0.001 0.050 0.060
## PopulatinRE 0.001 0.001 0.033 0.030 0.017
## PopulatinUM 0.002 0.003 0.002 0.002 0.015 0.045
## PopulatinVA 0.017 0.013 0.002 0.001 0.002 0.045 0.059
## PopulatinYE 0.035 0.064 0.001 0.001 0.015 0.002 0.029 0.017
WA_M_R_Ritchie_lmer <- lmer(CentroidSizeRight_micrometers ~ -1 + Population + (1|Line:Population) +
(1|Batch) + (1|ReplicateVial : Line : Population), data = (subset(d_WA_M,Supervisor.PI=='Ritchie')))
capture.output(summary(WA_M_R_Ritchie_lmer),file = "WingArea/WA_M_R_Ritchie_sum.txt")
capture.output(anova(WA_M_R_Ritchie_lmer),file = "WingArea/WA_M_R_Ritchie_lmer.txt")
capture.output(emmeans(WA_M_R_Ritchie_lmer, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "WingArea/WA_M_R_Ritchie_lmer_tk.txt")
anova(WA_M_R_Ritchie_lmer)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 185684975 20631664 9 22.81 3002.1 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(WA_M_R_Ritchie_lmer)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula:
## CentroidSizeRight_micrometers ~ -1 + Population + (1 | Line:Population) +
## (1 | Batch) + (1 | ReplicateVial:Line:Population)
## Data: (subset(d_WA_M, Supervisor.PI == "Ritchie"))
##
## REML criterion at convergence: 16215.3
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -4.9851 -0.5112 0.0484 0.5839 4.7200
##
## Random effects:
## Groups Name Variance Std.Dev.
## ReplicateVial:Line:Population (Intercept) 4472.4 66.88
## Line:Population (Intercept) 6265.6 79.16
## Batch (Intercept) 642.8 25.35
## Residual 6872.5 82.90
## Number of obs: 1368, groups:
## ReplicateVial:Line:Population, 132; Line:Population, 44; Batch, 15
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 2462.73 46.40 35.18 53.08 <2e-16 ***
## PopulationGI 2401.15 41.50 34.98 57.87 <2e-16 ***
## PopulationKA 2445.67 41.51 35.04 58.91 <2e-16 ***
## PopulationMA 2499.15 41.49 34.95 60.24 <2e-16 ***
## PopulationMU 2457.23 41.44 35.02 59.30 <2e-16 ***
## PopulationRE 2516.54 41.35 34.82 60.87 <2e-16 ***
## PopulationUM 2532.84 41.45 35.09 61.10 <2e-16 ***
## PopulationVA 2448.82 41.47 35.15 59.06 <2e-16 ***
## PopulationYE 2431.57 41.46 35.17 58.65 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.065
## PopulatinKA 0.000 0.000
## PopulatinMA 0.000 0.000 0.072
## PopulatinMU 0.001 0.001 0.059 0.059
## PopulatinRE 0.001 0.001 0.030 0.030 0.017
## PopulatinUM 0.002 0.002 0.002 0.002 0.015 0.044
## PopulatinVA 0.017 0.015 0.001 0.001 0.002 0.044 0.058
## PopulatinYE 0.034 0.045 0.001 0.001 0.014 0.002 0.029 0.017
p_WA_F_R_Ritchie <- ggplot(data = (subset(d_WA_F,Supervisor.PI=='Ritchie')), aes(x=Population_Lat, y=CentroidSizeRight_micrometers, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_WA_F_R_Ritchie", x="Population", y = "CentroidSizeRight_micrometers") + ylim(c(min_WAR, max_WAR))+ droseu_theme
## quartz_off_screen
## 2
p_WA_F_R_pop_Ritchie <- ggplot(data = (subset(d_WA_F,Supervisor.PI=='Ritchie')), aes(x=Population_Lat, y=CentroidSizeRight_micrometers, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_WA_F_R_pop_Ritchie", x="Population", y = "CentroidSizeRight_micrometers") + ylim(c(min_WAR, max_WAR))+ droseu_theme
## quartz_off_screen
## 2
p_WA_M_R_Ritchie <- ggplot(data = (subset(d_WA_M,Supervisor.PI=='Ritchie')), aes(x=Population_Lat, y=CentroidSizeRight_micrometers, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_WA_M_R_Ritchie", x="Population", y = "CentroidSizeRight_micrometers") + ylim(c(min_WAR, max_WAR))+ droseu_theme
## quartz_off_screen
## 2
p_WA_M_R_pop_Ritchie <- ggplot(data = (subset(d_WA_M,Supervisor.PI=='Ritchie')), aes(x=Population_Lat, y=CentroidSizeRight_micrometers, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_WA_M_R_pop_Ritchie", x="Population", y = "CentroidSizeRight_micrometers")+ ylim(c(min_WAR, max_WAR))+ droseu_theme
## quartz_off_screen
## 2
WA_F_R_StamenkovicRadak_lmer <- lmer(CentroidSizeRight_micrometers ~ -1 + Population + (1|Line:Population) +
(1|Batch) + (1|ReplicateVial : Line : Population), data = (subset(d_WA_F,Supervisor.PI=='StamenkovicRadak')))
## boundary (singular) fit: see ?isSingular
capture.output(summary(WA_F_R_StamenkovicRadak_lmer),file = "WingArea/WA_F_R_StamenkovicRadak_sum.txt")
capture.output(anova(WA_F_R_StamenkovicRadak_lmer),file = "WingArea/WA_F_R_StamenkovicRadak_lmer.txt")
capture.output(emmeans(WA_F_R_StamenkovicRadak_lmer, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "WingArea/WA_F_R_StamenkovicRadak_lmer_tk.txt")
anova(WA_F_R_StamenkovicRadak_lmer)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 2823766639 313751849 9 114.54 40710 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(WA_F_R_StamenkovicRadak_lmer)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula:
## CentroidSizeRight_micrometers ~ -1 + Population + (1 | Line:Population) +
## (1 | Batch) + (1 | ReplicateVial:Line:Population)
## Data: (subset(d_WA_F, Supervisor.PI == "StamenkovicRadak"))
##
## REML criterion at convergence: 44862
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -5.7152 -0.5616 0.0783 0.6287 3.6999
##
## Random effects:
## Groups Name Variance Std.Dev.
## ReplicateVial:Line:Population (Intercept) 5.797 2.408
## Line:Population (Intercept) 2476.853 49.768
## Batch (Intercept) 0.000 0.000
## Residual 7707.010 87.790
## Number of obs: 3787, groups:
## ReplicateVial:Line:Population, 124; Line:Population, 124; Batch, 5
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 2775.53 13.05 113.47 212.7 <2e-16 ***
## PopulationGI 2833.73 16.56 114.81 171.2 <2e-16 ***
## PopulationKA 2813.06 13.11 115.54 214.6 <2e-16 ***
## PopulationMA 2862.04 15.79 114.99 181.2 <2e-16 ***
## PopulationMU 2850.27 13.46 112.77 211.8 <2e-16 ***
## PopulationRE 2933.26 14.52 114.76 202.0 <2e-16 ***
## PopulationUM 2886.85 14.02 115.76 205.9 <2e-16 ***
## PopulationVA 2836.46 13.51 114.43 210.0 <2e-16 ***
## PopulationYE 2823.41 13.98 114.37 202.0 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.000
## PopulatinKA 0.000 0.000
## PopulatinMA 0.000 0.000 0.000
## PopulatinMU 0.000 0.000 0.000 0.000
## PopulatinRE 0.000 0.000 0.000 0.000 0.000
## PopulatinUM 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinVA 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinYE 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## optimizer (nloptwrap) convergence code: 0 (OK)
## boundary (singular) fit: see ?isSingular
WA_M_R_StamenkovicRadak_lmer <- lmer(CentroidSizeRight_micrometers ~ -1 + Population + (1|Line:Population) +
(1|Batch) + (1|ReplicateVial : Line : Population), data = (subset(d_WA_M,Supervisor.PI=='StamenkovicRadak')))
## Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
## unable to evaluate scaled gradient
## Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
## Model failed to converge: degenerate Hessian with 1 negative eigenvalues
## Warning: Model failed to converge with 1 negative eigenvalue: -1.4e-02
capture.output(summary(WA_M_R_StamenkovicRadak_lmer),file = "WingArea/WA_M_R_StamenkovicRadak_sum.txt")
capture.output(anova(WA_M_R_StamenkovicRadak_lmer),file = "WingArea/WA_M_R_StamenkovicRadak_lmer.txt")
capture.output(emmeans(WA_M_R_StamenkovicRadak_lmer, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "WingArea/WA_F_R_StamenkovicRadak_lmer_tk.txt")
anova(WA_M_R_StamenkovicRadak_lmer)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 2038283647 226475961 9 114.12 38578 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(WA_M_R_StamenkovicRadak_lmer)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula:
## CentroidSizeRight_micrometers ~ -1 + Population + (1 | Line:Population) +
## (1 | Batch) + (1 | ReplicateVial:Line:Population)
## Data: (subset(d_WA_M, Supervisor.PI == "StamenkovicRadak"))
##
## REML criterion at convergence: 42394.9
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -7.2672 -0.5646 0.0593 0.6360 5.9328
##
## Random effects:
## Groups Name Variance Std.Dev.
## ReplicateVial:Line:Population (Intercept) 5.938e+00 2.436877
## Line:Population (Intercept) 1.970e+03 44.383290
## Batch (Intercept) 9.486e-05 0.009739
## Residual 5.871e+03 76.619424
## Number of obs: 3662, groups:
## ReplicateVial:Line:Population, 124; Line:Population, 124; Batch, 5
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 2414.97 11.64 113.02 207.5 <2e-16 ***
## PopulationGI 2469.07 14.75 113.89 167.4 <2e-16 ***
## PopulationKA 2434.83 11.68 114.79 208.4 <2e-16 ***
## PopulationMA 2488.62 14.07 114.11 176.9 <2e-16 ***
## PopulationMU 2469.88 12.01 112.60 205.7 <2e-16 ***
## PopulationRE 2540.66 12.97 115.28 195.8 <2e-16 ***
## PopulationUM 2509.88 12.49 114.95 200.9 <2e-16 ***
## PopulationVA 2462.84 12.04 114.06 204.5 <2e-16 ***
## PopulationYE 2448.83 12.48 114.48 196.2 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.000
## PopulatinKA 0.000 0.000
## PopulatinMA 0.000 0.000 0.000
## PopulatinMU 0.000 0.000 0.000 0.000
## PopulatinRE 0.000 0.000 0.000 0.000 0.000
## PopulatinUM 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinVA 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinYE 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## optimizer (nloptwrap) convergence code: 0 (OK)
## unable to evaluate scaled gradient
## Model failed to converge: degenerate Hessian with 1 negative eigenvalues
p_WA_F_R_StamenkovicRadak <- ggplot(data = (subset(d_WA_F,Supervisor.PI=='StamenkovicRadak')), aes(x=Population_Lat, y=CentroidSizeRight_micrometers, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_WA_F_R_StamenkovicRadak", x="Population", y = "CentroidSizeRight_micrometers")+ ylim(c(min_WAR, max_WAR))+ droseu_theme
## quartz_off_screen
## 2
p_WA_F_R_pop_StamenkovicRadak <- ggplot(data = (subset(d_WA_F,Supervisor.PI=='StamenkovicRadak')), aes(x=Population_Lat, y=CentroidSizeRight_micrometers, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_WA_F_R_pop_StamenkovicRadak", x="Population", y = "CentroidSizeRight_micrometers") + ylim(c(min_WAR, max_WAR))+ droseu_theme
## quartz_off_screen
## 2
p_WA_M_R_StamenkovicRadak <- ggplot(data = (subset(d_WA_M,Supervisor.PI=='StamenkovicRadak')), aes(x=Population_Lat, y=CentroidSizeRight_micrometers, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_WA_M_R_StamenkovicRadak", x="Population", y = "CentroidSizeRight_micrometers")+ ylim(c(min_WAR, max_WAR))+ droseu_theme
## quartz_off_screen
## 2
p_WA_M_R_pop_StamenkovicRadak <- ggplot(data = (subset(d_WA_M,Supervisor.PI=='StamenkovicRadak')), aes(x=Population_Lat, y=CentroidSizeRight_micrometers, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_WA_M_R_pop_StamenkovicRadak", x="Population", y = "CentroidSizeRight_micrometers") + ylim(c(min_WAR, max_WAR))+ droseu_theme
## quartz_off_screen
## 2
intersect_Line_WA_F <- Reduce(intersect, list(d_WA_F$Line[d_WA_F$Supervisor.PI == "Onder"],
d_WA_F$Line[d_WA_F$Supervisor.PI == "Posnien"],
d_WA_F$Line[d_WA_F$Supervisor.PI == "Ritchie"],
d_WA_F$Line[d_WA_F$Supervisor.PI == "StamenkovicRadak"]))
write(intersect_Line_WA_F, file ="WingArea/intersect_Line_WA_F.txt", sep = "\t")
intersect_Pop_WA_F <- Reduce(intersect, list(d_WA_F$Population[d_WA_F$Supervisor.PI == "Onder"],
d_WA_F$Population[d_WA_F$Supervisor.PI == "Posnien"],
d_WA_F$Population[d_WA_F$Supervisor.PI == "Ritchie"],
d_WA_F$Population[d_WA_F$Supervisor.PI == "StamenkovicRadak"]))
write(intersect_Pop_WA_F, file ="WingArea/intersect_Pop_WA_F.txt", sep = "\t")
intersect_Line_WA_M <- Reduce(intersect, list(d_WA_M$Line[d_WA_M$Supervisor.PI == "Onder"],
d_WA_M$Line[d_WA_M$Supervisor.PI == "Posnien"],
d_WA_M$Line[d_WA_M$Supervisor.PI == "Ritchie"],
d_WA_M$Line[d_WA_M$Supervisor.PI == "StamenkovicRadak"]))
write(intersect_Line_WA_M, file ="WingArea/intersect_Line_WA_M.txt", sep = "\t")
intersect_Pop_WA_M <- Reduce(intersect, list(d_WA_M$Population[d_WA_M$Supervisor.PI == "Onder"],
d_WA_M$Population[d_WA_M$Supervisor.PI == "Posnien"],
d_WA_M$Population[d_WA_M$Supervisor.PI == "Ritchie"],
d_WA_M$Population[d_WA_M$Supervisor.PI == "StamenkovicRadak"]))
write(intersect_Pop_WA_M, file ="WingArea/intersect_Pop_WA_M.txt", sep = "\t")
There are 9 populations and 5 isofemale lines for females and 9 populations and 5 isofemale lines for males have been phenotyped across the labs. Please refer to tables named intersect_Trait_level (i.e. intersect_Via_pop) for details.
WA_L_fitted <- combineFitted(labs = rep(c("Onder", "Posnien", "Ritchie", "StamenkovicRadak"), 2), sex = rep(c("F", "M"), each = 4), models = list(WA_F_L_Onder_lmer, WA_F_L_Posnien_lmer, WA_F_L_Ritchie_lmer, WA_F_L_StamenkovicRadak_lmer, WA_M_L_Onder_lmer, WA_M_L_Posnien_lmer, WA_M_L_Ritchie_lmer, WA_M_L_StamenkovicRadak_lmer))
p_WA_L_F_lab_cor <- function() scatterPlotMatrix(WA_L_fitted, sex = "F")
p_WA_L_M_lab_cor <- function() scatterPlotMatrix(WA_L_fitted, sex = "M")
p_WA_L_F_lab_cor()
pdf(file="WingArea/p_WA_L_F_lab_cor.pdf",width=8, height=8)
p_WA_L_F_lab_cor()
invisible(dev.off())
p_WA_L_M_lab_cor()
pdf(file="WingArea/p_WA_L_M_lab_cor.pdf",width=8, height=8)
p_WA_L_M_lab_cor()
invisible(dev.off())
WA_R_fitted <- combineFitted(labs = rep(c("Onder", "Posnien", "Ritchie", "StamenkovicRadak"), 2), sex = rep(c("F", "M"), each = 4), models = list(WA_F_R_Onder_lmer, WA_F_R_Posnien_lmer, WA_F_R_Ritchie_lmer, WA_F_R_StamenkovicRadak_lmer, WA_M_R_Onder_lmer, WA_M_R_Posnien_lmer, WA_M_R_Ritchie_lmer, WA_M_R_StamenkovicRadak_lmer))
p_WA_R_F_lab_cor <- function() scatterPlotMatrix(WA_R_fitted, sex = "F")
p_WA_R_M_lab_cor <- function() scatterPlotMatrix(WA_R_fitted, sex = "M")
p_WA_R_F_lab_cor()
pdf(file="WingArea/p_WA_R_F_lab_cor.pdf",width=8, height=8)
p_WA_R_F_lab_cor()
invisible(dev.off())
p_WA_R_M_lab_cor()
pdf(file="WingArea/p_WA_R_M_lab_cor.pdf",width=8, height=8)
p_WA_R_M_lab_cor()
invisible(dev.off())
dir.create(file.path("Fecundity"), showWarnings = FALSE)
For a detailed description of tables, plots, linear models and outputs, please refer here
#Note that the trait has been phenotyped only in females.
Billeter Lab : Xiaocui Wang, Tiphaine Bailly, Mario Mira, Jean-Christophe Billeter
Fricke Lab : Claudia Fricke
Reading data in R
d_Fec <- read.csv("MasterSheets_Oct21_git/FEC_MasterSheet_Oct21.csv")
str(d_Fec)
## 'data.frame': 1725 obs. of 13 variables:
## $ Supervisor.PI : chr "Billeter" "Billeter" "Billeter" "Billeter" ...
## $ Diet : chr "NS" "NS" "NS" "NS" ...
## $ Batch : int 1 1 1 1 1 1 1 1 1 1 ...
## $ Population : chr "AK" "AK" "AK" "AK" ...
## $ Line : chr "AK1" "AK1" "AK1" "AK1" ...
## $ Individual : int 1 2 3 4 5 1 2 3 4 5 ...
## $ NumberOfAdultsEclosed: int 206 75 54 58 278 162 0 101 145 188 ...
## $ Notes : chr NA NA NA NA ...
## $ Censor : int 0 0 0 0 0 0 0 0 0 0 ...
## $ Country : chr "Finland" "Finland" "Finland" "Finland" ...
## $ Latitude : num 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 ...
## $ Longitude : num 23.5 23.5 23.5 23.5 23.5 ...
## $ Altitude : int 88 88 88 88 88 88 88 88 88 88 ...
Factors need reformatting (i.e. Supervisor.PI should be coded as a factor, not character).
str(d_Fec)
## 'data.frame': 1725 obs. of 13 variables:
## $ Supervisor.PI : chr "Billeter" "Billeter" "Billeter" "Billeter" ...
## $ Diet : chr "NS" "NS" "NS" "NS" ...
## $ Batch : int 1 1 1 1 1 1 1 1 1 1 ...
## $ Population : chr "AK" "AK" "AK" "AK" ...
## $ Line : chr "AK1" "AK1" "AK1" "AK1" ...
## $ Individual : int 1 2 3 4 5 1 2 3 4 5 ...
## $ NumberOfAdultsEclosed: int 206 75 54 58 278 162 0 101 145 188 ...
## $ Notes : chr NA NA NA NA ...
## $ Censor : int 0 0 0 0 0 0 0 0 0 0 ...
## $ Country : chr "Finland" "Finland" "Finland" "Finland" ...
## $ Latitude : num 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 ...
## $ Longitude : num 23.5 23.5 23.5 23.5 23.5 ...
## $ Altitude : int 88 88 88 88 88 88 88 88 88 88 ...
d_Fec$Supervisor.PI <- as.factor(d_Fec$Supervisor.PI)
d_Fec$Diet <- as.factor(d_Fec$Diet)
d_Fec$Batch <- as.factor(d_Fec$Batch)
d_Fec$Population <- as.factor(d_Fec$Population)
d_Fec$Population_Lat <- factor(d_Fec$Population, levels= c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))
d_Fec$Population_Lon <- factor(d_Fec$Population, levels= c("RE","GI","KA","MU","MA","AK","UM","YE","VA"))
d_Fec$Population_Alt <- factor(d_Fec$Population, levels= c("KA","AK","GI","RE","UM","VA","MU","MA","YE"))
d_Fec$Line <- as.factor(d_Fec$Line)
d_Fec$NumberOfAdultsEclosed <- as.numeric(d_Fec$NumberOfAdultsEclosed)
d_Fec$Censor <- as.factor(d_Fec$Censor)
str(d_Fec)
## 'data.frame': 1725 obs. of 16 variables:
## $ Supervisor.PI : Factor w/ 2 levels "Billeter","Fricke": 1 1 1 1 1 1 1 1 1 1 ...
## $ Diet : Factor w/ 2 levels "NS","S": 1 1 1 1 1 1 1 1 1 1 ...
## $ Batch : Factor w/ 8 levels "1","2","3","4",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Population : Factor w/ 9 levels "AK","GI","KA",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Line : Factor w/ 169 levels "AK1","AK10","AK11",..: 1 1 1 1 1 11 11 11 11 11 ...
## $ Individual : int 1 2 3 4 5 1 2 3 4 5 ...
## $ NumberOfAdultsEclosed: num 206 75 54 58 278 162 0 101 145 188 ...
## $ Notes : chr NA NA NA NA ...
## $ Censor : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
## $ Country : chr "Finland" "Finland" "Finland" "Finland" ...
## $ Latitude : num 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 ...
## $ Longitude : num 23.5 23.5 23.5 23.5 23.5 ...
## $ Altitude : int 88 88 88 88 88 88 88 88 88 88 ...
## $ Population_Lat : Factor w/ 9 levels "YE","RE","GI",..: 9 9 9 9 9 9 9 9 9 9 ...
## $ Population_Lon : Factor w/ 9 levels "RE","GI","KA",..: 6 6 6 6 6 6 6 6 6 6 ...
## $ Population_Alt : Factor w/ 9 levels "KA","AK","GI",..: 2 2 2 2 2 2 2 2 2 2 ...
d_Fec <- subset(d_Fec, Censor == "0")
Now they should be in the correct format, see below.
str(d_Fec)
## 'data.frame': 1721 obs. of 16 variables:
## $ Supervisor.PI : Factor w/ 2 levels "Billeter","Fricke": 1 1 1 1 1 1 1 1 1 1 ...
## $ Diet : Factor w/ 2 levels "NS","S": 1 1 1 1 1 1 1 1 1 1 ...
## $ Batch : Factor w/ 8 levels "1","2","3","4",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Population : Factor w/ 9 levels "AK","GI","KA",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Line : Factor w/ 169 levels "AK1","AK10","AK11",..: 1 1 1 1 1 11 11 11 11 11 ...
## $ Individual : int 1 2 3 4 5 1 2 3 4 5 ...
## $ NumberOfAdultsEclosed: num 206 75 54 58 278 162 0 101 145 188 ...
## $ Notes : chr NA NA NA NA ...
## $ Censor : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
## $ Country : chr "Finland" "Finland" "Finland" "Finland" ...
## $ Latitude : num 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 ...
## $ Longitude : num 23.5 23.5 23.5 23.5 23.5 ...
## $ Altitude : int 88 88 88 88 88 88 88 88 88 88 ...
## $ Population_Lat : Factor w/ 9 levels "YE","RE","GI",..: 9 9 9 9 9 9 9 9 9 9 ...
## $ Population_Lon : Factor w/ 9 levels "RE","GI","KA",..: 6 6 6 6 6 6 6 6 6 6 ...
## $ Population_Alt : Factor w/ 9 levels "KA","AK","GI",..: 2 2 2 2 2 2 2 2 2 2 ...
Descriptive statistics at the line level, with batch information :
Descriptive statistics for fecundity at the line level, without batch information :
Descriptive statistics at the population level, with batch information :
Descriptive statistics at the population level, without batch information :
min_Fec <- min(d_Fec$NumberOfAdultsEclosed)
max_Fec <- max(d_Fec$NumberOfAdultsEclosed)
y-axis is scaled by the minimum (0) and maximum (306) values in the full data set.
p_Fec_all <- ggplot(data = d_Fec, aes(x=Population_Lat, y=NumberOfAdultsEclosed, fill=Supervisor.PI)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_Fec_all", x="Population", y = "DW_micrograms") + ylim(c(min_Fec, max_Fec))+ droseu_theme
## quartz_off_screen
## 2
Fec_lmer_Billeter <- lmer(NumberOfAdultsEclosed ~ -1 + Population + (1|Population:Line), data = d_Fec[d_Fec$Supervisor.PI == "Billeter",])
capture.output(anova(Fec_lmer_Billeter),file = "Fecundity/Fec_lmer_Billeter.txt")
capture.output(summary(Fec_lmer_Billeter),file = "Fecundity/Fec_lmer_Billeter_sum.txt")
capture.output(emmeans(Fec_lmer_Billeter, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"), file = "Fecundity/Fec_lmer_Billeter_tk.txt")
model_means_Fec_Billeter <- emmeans(object = Fec_lmer_Billeter, specs = ~ Population)
model_means_Fec_Billeter_cld <- cld(object = model_means_Fec_Billeter, adjust = "Tukey", Letters = letters, alpha = 0.05) %>% as.data.frame %>% mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))) %>% arrange(Population) %>% dplyr::rename(cld = .group)
## Note: adjust = "tukey" was changed to "sidak"
## because "tukey" is only appropriate for one set of pairwise comparisons
anova(Fec_lmer_Billeter)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 2150407 238934 9 148.4 86.477 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(Fec_lmer_Billeter)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: NumberOfAdultsEclosed ~ -1 + Population + (1 | Population:Line)
## Data: d_Fec[d_Fec$Supervisor.PI == "Billeter", ]
##
## REML criterion at convergence: 8773.2
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.02323 -0.55643 -0.03579 0.53645 2.97008
##
## Random effects:
## Groups Name Variance Std.Dev.
## Population:Line (Intercept) 1113 33.36
## Residual 2763 52.56
## Number of obs: 805, groups: Population:Line, 160
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 97.067 9.154 149.480 10.603 < 2e-16 ***
## PopulationGI 74.193 10.465 144.161 7.090 5.54e-11 ***
## PopulationKA 109.970 9.128 148.291 12.047 < 2e-16 ***
## PopulationMA 99.120 9.868 146.604 10.045 < 2e-16 ***
## PopulationMU 93.842 9.546 155.094 9.830 < 2e-16 ***
## PopulationRE 67.854 10.896 147.650 6.227 4.68e-09 ***
## PopulationUM 102.827 10.537 148.601 9.758 < 2e-16 ***
## PopulationVA 86.333 9.080 145.006 9.508 < 2e-16 ***
## PopulationYE 63.937 9.179 151.258 6.966 9.36e-11 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.000
## PopulatinKA 0.000 0.000
## PopulatinMA 0.000 0.000 0.000
## PopulatinMU 0.000 0.000 0.000 0.000
## PopulatinRE 0.000 0.000 0.000 0.000 0.000
## PopulatinUM 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinVA 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinYE 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
p_Fec_Billeter <- ggplot(data = (subset(d_Fec,Supervisor.PI=='Billeter')), aes(x=Population_Lat, y=NumberOfAdultsEclosed, fill=Batch)) + geom_boxplot(outlier.shape = NA, notch=FALSE) + labs(title="p_Fec_Billeter", x="Population", y = "NumberOfAdultsEclosed") + ylim(c(min_Fec, max_Fec))+ droseu_theme
## quartz_off_screen
## 2
p_Fec_pop_Billeter <- ggplot(data = (subset(d_Fec,Supervisor.PI=='Billeter')), aes(x=Population_Lat, y=NumberOfAdultsEclosed, fill=Population)) + geom_boxplot(outlier.shape = NA, notch=FALSE) + labs(title="p_Fec_pop_Billeter", x="Population", y = "NumberOfAdultsEclosed") + ylim(c(min_Fec, max_Fec))+geom_text(data = model_means_Fec_Billeter_cld, aes(x = Population, label = cld), y = 1, vjust = 1) + droseu_theme
## quartz_off_screen
## 2
model_means_Fec_Fricke <- emmeans(object = Fec_lmer_Fricke, specs = ~ Population)
model_means_Fec_Fricke_cld <- cld(object = model_means_Fec_Fricke, adjust = "Tukey", Letters = letters, alpha = 0.05) %>% as.data.frame %>% mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))) %>% arrange(Population) %>% dplyr::rename(cld = .group)
## Note: adjust = "tukey" was changed to "sidak"
## because "tukey" is only appropriate for one set of pairwise comparisons
anova(Fec_lmer_Fricke)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 346953 38550 9 54.703 30.968 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(Fec_lmer_Fricke)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: NumberOfAdultsEclosed ~ -1 + Population + (1 | Population:Line) +
## (1 | Batch)
## Data: d_Fec[d_Fec$Supervisor.PI == "Fricke", ]
##
## REML criterion at convergence: 9249.1
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.8102 -0.6481 -0.0705 0.5894 3.4523
##
## Random effects:
## Groups Name Variance Std.Dev.
## Population:Line (Intercept) 455.06 21.332
## Batch (Intercept) 41.26 6.423
## Residual 1244.86 35.283
## Number of obs: 916, groups: Population:Line, 161; Batch, 8
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 61.074 6.779 95.724 9.009 2.05e-14 ***
## PopulationGI 50.491 7.392 108.616 6.830 5.10e-10 ***
## PopulationKA 50.776 6.613 85.361 7.678 2.45e-11 ***
## PopulationMA 55.985 6.500 82.745 8.613 3.97e-13 ***
## PopulationMU 56.867 6.667 93.038 8.529 2.62e-13 ***
## PopulationRE 57.462 7.300 105.927 7.871 3.20e-12 ***
## PopulationUM 46.999 6.848 93.859 6.863 7.16e-10 ***
## PopulationVA 53.882 6.631 93.870 8.126 1.75e-12 ***
## PopulationYE 52.842 6.608 91.405 7.996 3.80e-12 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.127
## PopulatinKA 0.143 0.133
## PopulatinMA 0.147 0.134 0.154
## PopulatinMU 0.129 0.116 0.136 0.134
## PopulatinRE 0.129 0.119 0.136 0.143 0.117
## PopulatinUM 0.135 0.124 0.140 0.152 0.121 0.132
## PopulatinVA 0.134 0.121 0.141 0.150 0.131 0.127 0.134
## PopulatinYE 0.137 0.125 0.143 0.151 0.127 0.132 0.140 0.134
## quartz_off_screen
## 2
## quartz_off_screen
## 2
intersect_Line_Fec <- intersect(d_Fec$Line[d_Fec$Supervisor.PI == "Billeter"],
d_Fec$Line[d_Fec$Supervisor.PI == "Fricke"])
write(intersect_Line_Fec, file ="Fecundity/intersect_Line_Fec.txt", sep = "\t")
intersect_Pop_Fec <- intersect(d_Fec$Line[d_Fec$Supervisor.PI == "Billeter"],
d_Fec$Line[d_Fec$Supervisor.PI == "Fricke"])
write(intersect_Pop_Fec, file ="Fecundity/intersect_Pop_Fec.txt", sep = "\t")
There are 152 populations and 152 isofemale lines that have been phenotyped across the labs. Please refer to tables named intersect_Trait_level (i.e. intersect_Via_pop) for details.
Fec_fitted <- combineFitted(labs = c("Billeter", "Fricke"), sex = rep("NA", 2), models = list(Fec_lmer_Billeter, Fec_lmer_Fricke))
p_Fec_lab_cor <- function() scatterPlotMatrix(Fec_fitted, sex = "NA")
p_Fec_lab_cor()
pdf(file="Fecundity/p_Fec_lab_cor.pdf",width=8, height=8)
p_Fec_lab_cor()
invisible(dev.off())
dir.create(file.path("Lifespan"), showWarnings = FALSE)
For a detailed description of tables, plots, linear models and outputs, please refer here
Flatt Lab : Esra Durmaz, Envel Kerdaffrec, Thibault Schowing, Virginie Thieu, Marisa Rodrigues, Thomas Flatt
Parsch Lab : Amanda Glaser-Schmitt, Eliza Argyridou, John Parsch
Pasyukova Lab : Natalia Roshina, Alexander Symonenko, Mikhail Trostnikov, Evgenia Tsybul’ko, Ekaterina Veselkina, Olga Rybina, Elena Pasyukova
d_LS_L <- read.csv("MasterSheets_Oct21_git/LSL_MasterSheet_Oct21.csv")
str(d_LS_L)
## 'data.frame': 39844 obs. of 15 variables:
## $ Supervisor.PI : chr "Pasyukova" "Pasyukova" "Pasyukova" "Pasyukova" ...
## $ Diet : chr "S" "S" "S" "S" ...
## $ Batch : int 1 1 1 1 1 1 1 1 1 1 ...
## $ Population : chr "AK" "AK" "AK" "AK" ...
## $ Line : chr "AK1" "AK1" "AK1" "AK1" ...
## $ Sex : chr "F" "F" "F" "F" ...
## $ ReplicateVialOld : int 1 1 1 1 1 1 1 1 1 1 ...
## $ ReplicateVial : chr "Pasyukova_1_AK1_1" "Pasyukova_1_AK1_1" "Pasyukova_1_AK1_1" "Pasyukova_1_AK1_1" ...
## $ Individual : int 1 2 3 4 5 6 7 8 9 10 ...
## $ Censor : int 0 0 0 0 0 0 0 0 0 0 ...
## $ LSL_AgeAtDeath_days: int 10 37 41 42 42 45 45 45 45 46 ...
## $ Country : chr "Finland" "Finland" "Finland" "Finland" ...
## $ Latitude : num 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 ...
## $ Longitude : num 23.5 23.5 23.5 23.5 23.5 ...
## $ Altitude : int 88 88 88 88 88 88 88 88 88 88 ...
d_LS_L$Supervisor.PI <- as.factor(d_LS_L$Supervisor.PI)
d_LS_L$Diet <- as.factor(d_LS_L$Diet)
d_LS_L$Batch <- as.factor(d_LS_L$Batch)
d_LS_L$Population <- as.factor(d_LS_L$Population)
d_LS_L$Population_Lat <- factor(d_LS_L$Population, levels= c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))
d_LS_L$Population_Lon <- factor(d_LS_L$Population, levels= c("RE","GI","KA","MU","MA","AK","UM","YE","VA"))
d_LS_L$Population_Alt <- factor(d_LS_L$Population, levels= c("KA","AK","GI","RE","UM","VA","MU","MA","YE"))
d_LS_L$Line <- as.factor(d_LS_L$Line)
d_LS_L$ReplicateVial <- as.factor(d_LS_L$ReplicateVial)
d_LS_L$LSL_AgeAtDeath_days <- as.numeric(d_LS_L$LSL_AgeAtDeath_days)
d_LS_L$Censor <- as.factor(d_LS_L$Censor)
str(d_LS_L)
## 'data.frame': 39844 obs. of 18 variables:
## $ Supervisor.PI : Factor w/ 2 levels "Parsch","Pasyukova": 2 2 2 2 2 2 2 2 2 2 ...
## $ Diet : Factor w/ 2 levels "NS","S": 2 2 2 2 2 2 2 2 2 2 ...
## $ Batch : Factor w/ 2 levels "1","2": 1 1 1 1 1 1 1 1 1 1 ...
## $ Population : Factor w/ 9 levels "AK","GI","KA",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Line : Factor w/ 171 levels "AK1","AK10","AK11",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Sex : chr "F" "F" "F" "F" ...
## $ ReplicateVialOld : int 1 1 1 1 1 1 1 1 1 1 ...
## $ ReplicateVial : Factor w/ 2032 levels "Parsch_1_AK1_1",..: 681 681 681 681 681 681 681 681 681 681 ...
## $ Individual : int 1 2 3 4 5 6 7 8 9 10 ...
## $ Censor : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
## $ LSL_AgeAtDeath_days: num 10 37 41 42 42 45 45 45 45 46 ...
## $ Country : chr "Finland" "Finland" "Finland" "Finland" ...
## $ Latitude : num 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 ...
## $ Longitude : num 23.5 23.5 23.5 23.5 23.5 ...
## $ Altitude : int 88 88 88 88 88 88 88 88 88 88 ...
## $ Population_Lat : Factor w/ 9 levels "YE","RE","GI",..: 9 9 9 9 9 9 9 9 9 9 ...
## $ Population_Lon : Factor w/ 9 levels "RE","GI","KA",..: 6 6 6 6 6 6 6 6 6 6 ...
## $ Population_Alt : Factor w/ 9 levels "KA","AK","GI",..: 2 2 2 2 2 2 2 2 2 2 ...
d_LS_L_F <-subset(d_LS_L,Sex=='F')
d_LS_L_M <-subset(d_LS_L,Sex=='M')
d_LS_P <- read.csv("MasterSheets_Oct21_git/LSP_MasterSheet_Oct21.csv")
str(d_LS_P)
## 'data.frame': 10612 obs. of 14 variables:
## $ Supervisor.PI : chr "Flatt" "Flatt" "Flatt" "Flatt" ...
## $ Diet : chr "S" "S" "S" "S" ...
## $ Batch : int 1 1 1 1 1 1 1 1 1 1 ...
## $ Population : chr "AK" "AK" "AK" "AK" ...
## $ Sex : chr "F" "F" "F" "F" ...
## $ ReplicateCageOld : int 1 1 1 1 1 1 1 1 1 1 ...
## $ ReplicateCage : chr "Flatt_AK_F_1" "Flatt_AK_F_1" "Flatt_AK_F_1" "Flatt_AK_F_1" ...
## $ Individual : int 1 2 3 4 5 6 7 8 9 10 ...
## $ Censor : int 1 1 1 1 0 0 0 1 0 0 ...
## $ LSP_AgeAtDeath_days: int 11 11 17 23 26 26 33 33 40 43 ...
## $ Country : chr "Finland" "Finland" "Finland" "Finland" ...
## $ Latitude : num 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 ...
## $ Longitude : num 23.5 23.5 23.5 23.5 23.5 ...
## $ Altitude : int 88 88 88 88 88 88 88 88 88 88 ...
d_LS_P$Supervisor.PI <- as.factor(d_LS_P$Supervisor.PI)
d_LS_P$Diet <- as.factor(d_LS_P$Diet)
d_LS_P$Batch <- as.factor(d_LS_P$Batch)
d_LS_P$Population <- as.factor(d_LS_P$Population)
d_LS_P$Population_Lat <- factor(d_LS_P$Population, levels= c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))
d_LS_P$Population_Lon <- factor(d_LS_P$Population, levels= c("RE","GI","KA","MU","MA","AK","UM","YE","VA"))
d_LS_P$Population_Alt <- factor(d_LS_P$Population, levels= c("KA","AK","GI","RE","UM","VA","MU","MA","YE"))
d_LS_P$ReplicateCage <- as.factor(d_LS_P$ReplicateCage)
d_LS_P$LSP_AgeAtDeath_days <- as.numeric(d_LS_P$LSP_AgeAtDeath_days)
d_LS_P$Censor <- as.factor(d_LS_P$Censor)
str(d_LS_P)
## 'data.frame': 10612 obs. of 17 variables:
## $ Supervisor.PI : Factor w/ 1 level "Flatt": 1 1 1 1 1 1 1 1 1 1 ...
## $ Diet : Factor w/ 1 level "S": 1 1 1 1 1 1 1 1 1 1 ...
## $ Batch : Factor w/ 1 level "1": 1 1 1 1 1 1 1 1 1 1 ...
## $ Population : Factor w/ 9 levels "AK","GI","KA",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Sex : chr "F" "F" "F" "F" ...
## $ ReplicateCageOld : int 1 1 1 1 1 1 1 1 1 1 ...
## $ ReplicateCage : Factor w/ 180 levels "Flatt_AK_F_1",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Individual : int 1 2 3 4 5 6 7 8 9 10 ...
## $ Censor : Factor w/ 2 levels "0","1": 2 2 2 2 1 1 1 2 1 1 ...
## $ LSP_AgeAtDeath_days: num 11 11 17 23 26 26 33 33 40 43 ...
## $ Country : chr "Finland" "Finland" "Finland" "Finland" ...
## $ Latitude : num 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 ...
## $ Longitude : num 23.5 23.5 23.5 23.5 23.5 ...
## $ Altitude : int 88 88 88 88 88 88 88 88 88 88 ...
## $ Population_Lat : Factor w/ 9 levels "YE","RE","GI",..: 9 9 9 9 9 9 9 9 9 9 ...
## $ Population_Lon : Factor w/ 9 levels "RE","GI","KA",..: 6 6 6 6 6 6 6 6 6 6 ...
## $ Population_Alt : Factor w/ 9 levels "KA","AK","GI",..: 2 2 2 2 2 2 2 2 2 2 ...
d_LS_P_F <-subset(d_LS_P,Sex=='F')
d_LS_P_M <-subset(d_LS_P,Sex=='M')
d_LS_M <- read.csv("MasterSheets_Oct21_git/LSM_MasterSheet_Oct21.csv")
str(d_LS_M)
## 'data.frame': 50456 obs. of 12 variables:
## $ Supervisor.PI : chr "Pasyukova" "Pasyukova" "Pasyukova" "Pasyukova" ...
## $ Diet : chr "S" "S" "S" "S" ...
## $ Batch : int 1 1 1 1 1 1 1 1 1 1 ...
## $ Population : chr "AK" "AK" "AK" "AK" ...
## $ Sex : chr "F" "F" "F" "F" ...
## $ Individual : int 1 2 3 4 5 6 7 8 9 10 ...
## $ Censor : int 0 0 0 0 0 0 0 0 0 0 ...
## $ LSM_AgeAtDeath_days: int 10 37 41 42 42 45 45 45 45 46 ...
## $ Country : chr "Finland" "Finland" "Finland" "Finland" ...
## $ Latitude : num 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 ...
## $ Longitude : num 23.5 23.5 23.5 23.5 23.5 ...
## $ Altitude : int 88 88 88 88 88 88 88 88 88 88 ...
d_LS_M$Supervisor.PI <- as.factor(d_LS_M$Supervisor.PI)
d_LS_M$Diet <- as.factor(d_LS_M$Diet)
d_LS_M$Batch <- as.factor(d_LS_M$Batch)
d_LS_M$Population <- as.factor(d_LS_M$Population)
d_LS_M$Population_Lat <- factor(d_LS_M$Population, levels= c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))
d_LS_M$Population_Lon <- factor(d_LS_M$Population, levels= c("RE","GI","KA","MU","MA","AK","UM","YE","VA"))
d_LS_M$Population_Alt <- factor(d_LS_M$Population, levels= c("KA","AK","GI","RE","UM","VA","MU","MA","YE"))
d_LS_M$LSM_AgeAtDeath_days <- as.numeric(d_LS_M$LSM_AgeAtDeath_days)
d_LS_M$Censor <- as.factor(d_LS_M$Censor)
str(d_LS_M)
## 'data.frame': 50456 obs. of 15 variables:
## $ Supervisor.PI : Factor w/ 3 levels "Flatt","Parsch",..: 3 3 3 3 3 3 3 3 3 3 ...
## $ Diet : Factor w/ 2 levels "NS","S": 2 2 2 2 2 2 2 2 2 2 ...
## $ Batch : Factor w/ 2 levels "1","2": 1 1 1 1 1 1 1 1 1 1 ...
## $ Population : Factor w/ 9 levels "AK","GI","KA",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Sex : chr "F" "F" "F" "F" ...
## $ Individual : int 1 2 3 4 5 6 7 8 9 10 ...
## $ Censor : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
## $ LSM_AgeAtDeath_days: num 10 37 41 42 42 45 45 45 45 46 ...
## $ Country : chr "Finland" "Finland" "Finland" "Finland" ...
## $ Latitude : num 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 ...
## $ Longitude : num 23.5 23.5 23.5 23.5 23.5 ...
## $ Altitude : int 88 88 88 88 88 88 88 88 88 88 ...
## $ Population_Lat : Factor w/ 9 levels "YE","RE","GI",..: 9 9 9 9 9 9 9 9 9 9 ...
## $ Population_Lon : Factor w/ 9 levels "RE","GI","KA",..: 6 6 6 6 6 6 6 6 6 6 ...
## $ Population_Alt : Factor w/ 9 levels "KA","AK","GI",..: 2 2 2 2 2 2 2 2 2 2 ...
d_LS_M_F <-subset(d_LS_M,Sex=='F')
d_LS_M_M <-subset(d_LS_M,Sex=='M')
Descriptive statistics at the line level, with batch information :
table_LS_L_Line_wbatch <- write.csv(d_LS_L %>% group_by(Supervisor.PI, Batch, Sex, Population, Line) %>%
summarise_at(vars(LSL_AgeAtDeath_days),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "Lifespan/table_LS_L_Line_wbatch.csv", row.names = T)
table_LS_L_Line_wbatch <- read.csv("Lifespan/table_LS_L_Line_wbatch.csv")
Descriptive statistics at the line level, without batch information :
table_LS_L_Line_wobatch <- write.csv(d_LS_L %>% group_by(Supervisor.PI, Sex, Population, Line) %>%
summarise_at(vars(LSL_AgeAtDeath_days),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "Lifespan/table_LS_L_Line_wobatch.csv", row.names = T)
table_LS_L_Line_wobatch <- read.csv("Lifespan/table_LS_L_Line_wobatch.csv")
Descriptive statistics at the population level, with batch information :
table_LS_M_Pop_wbatch <- write.csv(d_LS_M %>% group_by(Supervisor.PI, Batch, Sex, Population) %>%
summarise_at(vars(LSM_AgeAtDeath_days),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "Lifespan/table_LS_M_Pop_wbatch.csv", row.names = T)
table_LS_M_Pop_wbatch <- read.csv("Lifespan/table_LS_M_Pop_wbatch.csv")
Descriptive statistics at the population level, without batch information :
table_LS_M_Pop_wobatch <- write.csv(d_LS_M %>% group_by(Supervisor.PI, Sex, Population) %>%
summarise_at(vars(LSM_AgeAtDeath_days),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "Lifespan/table_LS_M_Pop_wobatch.csv", row.names = T)
table_LS_M_Pop_wobatch <- read.csv("Lifespan/table_LS_M_Pop_wobatch.csv")
min_LS <- min(d_LS_M$LSM_AgeAtDeath_days)
max_LS <- max(d_LS_M$LSM_AgeAtDeath_days)
y-axis is scaled by the minimum (1) and maximum (112) values in the full data set.
## quartz_off_screen
## 2
## quartz_off_screen
## 2
LS_P_F_Flatt_lmer <- lmer(LSP_AgeAtDeath_days ~ -1 + Population + (1|Population:ReplicateCage), data = filter(d_LS_P_F, Censor == "0" & Supervisor.PI == "Flatt"))
capture.output(summary(LS_P_F_Flatt_lmer),file = "Lifespan/LS_P_F_Flatt_lmer.txt")
capture.output(anova(LS_P_F_Flatt_lmer),file = "Lifespan/LS_P_F_Flatt_lmer.txt")
capture.output(emmeans(LS_P_F_Flatt_lmer, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "Lifespan/LS_P_F_Flatt_lmer_tk.txt")
anova(LS_P_F_Flatt_lmer)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 4720794 524533 9 80.872 3341.1 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(LS_P_F_Flatt_lmer)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: LSP_AgeAtDeath_days ~ -1 + Population + (1 | Population:ReplicateCage)
## Data: filter(d_LS_P_F, Censor == "0" & Supervisor.PI == "Flatt")
##
## REML criterion at convergence: 36116.1
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -4.3943 -0.6327 -0.0087 0.6402 3.5292
##
## Random effects:
## Groups Name Variance Std.Dev.
## Population:ReplicateCage (Intercept) 5.11 2.261
## Residual 156.99 12.530
## Number of obs: 4567, groups: Population:ReplicateCage, 90
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 60.0334 0.9132 83.3744 65.74 <2e-16 ***
## PopulationGI 42.9477 0.8945 76.7627 48.01 <2e-16 ***
## PopulationKA 55.4246 0.8972 77.6946 61.77 <2e-16 ***
## PopulationMA 50.5195 0.9074 81.2343 55.68 <2e-16 ***
## PopulationMU 57.4202 0.9103 82.2518 63.08 <2e-16 ***
## PopulationRE 45.6074 0.9038 80.0209 50.46 <2e-16 ***
## PopulationUM 51.6708 0.9208 85.8668 56.12 <2e-16 ***
## PopulationVA 56.2711 0.9109 82.3980 61.77 <2e-16 ***
## PopulationYE 49.6624 0.9011 79.0852 55.11 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.000
## PopulatinKA 0.000 0.000
## PopulatinMA 0.000 0.000 0.000
## PopulatinMU 0.000 0.000 0.000 0.000
## PopulatinRE 0.000 0.000 0.000 0.000 0.000
## PopulatinUM 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinVA 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinYE 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
LS_P_M_Flatt_lmer <- lmer(LSP_AgeAtDeath_days ~ -1 + Population + (1|Population:ReplicateCage), data = filter(d_LS_P_M, Censor == "0" & Supervisor.PI == "Flatt"))
capture.output(summary(LS_P_M_Flatt_lmer),file = "Lifespan/LS_P_M_Flatt_lmer_sum.txt")
capture.output(anova(LS_P_M_Flatt_lmer),file = "Lifespan/LS_P_M_Flatt_lmer.txt")
capture.output(emmeans(LS_P_M_Flatt_lmer, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "Lifespan/LS_P_M_Flatt_lmer_tk.txt")
anova(LS_P_M_Flatt_lmer)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 5928693 658744 9 80.244 3768.4 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(LS_P_M_Flatt_lmer)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: LSP_AgeAtDeath_days ~ -1 + Population + (1 | Population:ReplicateCage)
## Data: filter(d_LS_P_M, Censor == "0" & Supervisor.PI == "Flatt")
##
## REML criterion at convergence: 35650
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.9146 -0.6656 -0.0467 0.6755 3.0925
##
## Random effects:
## Groups Name Variance Std.Dev.
## Population:ReplicateCage (Intercept) 3.827 1.956
## Residual 174.806 13.221
## Number of obs: 4450, groups: Population:ReplicateCage, 90
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 51.6194 0.8739 86.0482 59.06 <2e-16 ***
## PopulationGI 50.8448 0.8507 77.1614 59.77 <2e-16 ***
## PopulationKA 56.0643 0.8543 78.6017 65.63 <2e-16 ***
## PopulationMA 53.0393 0.8502 77.1549 62.38 <2e-16 ***
## PopulationMU 55.6448 0.8667 83.3740 64.20 <2e-16 ***
## PopulationRE 50.4210 0.8510 77.2981 59.25 <2e-16 ***
## PopulationUM 52.3560 0.8536 78.1773 61.34 <2e-16 ***
## PopulationVA 52.0358 0.8796 87.9588 59.16 <2e-16 ***
## PopulationYE 52.3283 0.8531 78.1557 61.34 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.000
## PopulatinKA 0.000 0.000
## PopulatinMA 0.000 0.000 0.000
## PopulatinMU 0.000 0.000 0.000 0.000
## PopulatinRE 0.000 0.000 0.000 0.000 0.000
## PopulatinUM 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinVA 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinYE 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## quartz_off_screen
## 2
## quartz_off_screen
## 2
LS_L_F_Parsch_lmer <- lmer(LSL_AgeAtDeath_days ~ -1 + Population + (1|Batch) + (1|Population:Line) + (1|Line:ReplicateVial), data = filter(d_LS_L_F, Censor == "0" & Supervisor.PI == "Parsch"))
capture.output(summary(LS_L_F_Parsch_lmer),file = "Lifespan/LS_L_F_Parsch_lmer_sum.txt")
capture.output(anova(LS_L_F_Parsch_lmer),file = "Lifespan/LS_L_F_Parsch_lmer.txt")
capture.output(emmeans(LS_L_F_Parsch_lmer, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "Lifespan/LS_L_F_Parsch_lmer_tk.txt")
anova(LS_L_F_Parsch_lmer)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 130058 14451 9 2 54.048 0.01829 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(LS_L_F_Parsch_lmer)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula:
## LSL_AgeAtDeath_days ~ -1 + Population + (1 | Batch) + (1 | Population:Line) +
## (1 | Line:ReplicateVial)
## Data: filter(d_LS_L_F, Censor == "0" & Supervisor.PI == "Parsch")
##
## REML criterion at convergence: 42206.7
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.6820 -0.5293 0.1220 0.6479 2.5964
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:ReplicateVial (Intercept) 46.61 6.827
## Population:Line (Intercept) 21.52 4.639
## Batch (Intercept) 12.92 3.594
## Residual 267.37 16.351
## Number of obs: 4934, groups:
## Line:ReplicateVial, 679; Population:Line, 135; Batch, 2
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 59.625 3.000 1.861 19.88 0.00350 **
## PopulationGI 54.909 3.006 1.877 18.27 0.00395 **
## PopulationKA 56.866 3.003 1.871 18.93 0.00374 **
## PopulationMA 47.306 3.011 1.889 15.71 0.00509 **
## PopulationMU 54.014 3.003 1.871 17.98 0.00412 **
## PopulationRE 46.438 3.001 1.866 15.47 0.00551 **
## PopulationUM 49.083 3.004 1.872 16.34 0.00491 **
## PopulationVA 56.420 2.997 1.855 18.83 0.00393 **
## PopulationYE 54.592 3.007 1.881 18.15 0.00396 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.717
## PopulatinKA 0.717 0.715
## PopulatinMA 0.715 0.713 0.715
## PopulatinMU 0.717 0.715 0.716 0.714
## PopulatinRE 0.717 0.716 0.717 0.715 0.717
## PopulatinUM 0.717 0.715 0.716 0.714 0.716 0.717
## PopulatinVA 0.718 0.717 0.718 0.716 0.718 0.718 0.718
## PopulatinYE 0.716 0.714 0.715 0.714 0.715 0.716 0.715 0.717
LS_L_M_Parsch_lmer <- lmer(LSL_AgeAtDeath_days ~ -1 + Population + (1|Batch) + (1|Population:Line) + (1|Line:ReplicateVial), data = filter(d_LS_L_M, Censor == "0" & Supervisor.PI == "Parsch"))
capture.output(summary(LS_L_M_Parsch_lmer),file = "Lifespan/LS_L_M_Parsch_lmer_sum.txt")
capture.output(anova(LS_L_M_Parsch_lmer),file = "Lifespan/LS_L_M_Parsch_lmer.txt")
capture.output(emmeans(LS_L_M_Parsch_lmer, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "Lifespan/LS_L_M_Parsch_lmer_tk.txt")
anova(LS_L_M_Parsch_lmer)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 725146 80572 9 2 226.58 0.004402 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(LS_L_M_Parsch_lmer)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula:
## LSL_AgeAtDeath_days ~ -1 + Population + (1 | Batch) + (1 | Population:Line) +
## (1 | Line:ReplicateVial)
## Data: filter(d_LS_L_M, Censor == "0" & Supervisor.PI == "Parsch")
##
## REML criterion at convergence: 42301.4
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.2393 -0.5900 0.0897 0.6900 2.7320
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:ReplicateVial (Intercept) 13.150 3.626
## Population:Line (Intercept) 34.973 5.914
## Batch (Intercept) 2.336 1.528
## Residual 355.597 18.857
## Number of obs: 4821, groups:
## Line:ReplicateVial, 679; Population:Line, 135; Batch, 2
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 60.473 2.089 11.236 28.94 6.57e-12 ***
## PopulationGI 51.369 2.087 11.190 24.61 4.25e-11 ***
## PopulationKA 56.795 2.087 11.183 27.21 1.42e-11 ***
## PopulationMA 50.958 2.089 11.228 24.39 4.42e-11 ***
## PopulationMU 58.601 2.080 11.036 28.18 1.24e-11 ***
## PopulationRE 49.221 2.081 11.065 23.65 7.97e-11 ***
## PopulationUM 56.873 2.089 11.226 27.23 1.32e-11 ***
## PopulationVA 59.741 2.086 11.157 28.64 8.42e-12 ***
## PopulationYE 51.676 2.088 11.202 24.75 3.92e-11 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.268
## PopulatinKA 0.267 0.268
## PopulatinMA 0.267 0.267 0.269
## PopulatinMU 0.269 0.269 0.269 0.269
## PopulatinRE 0.268 0.268 0.269 0.269 0.270
## PopulatinUM 0.267 0.268 0.268 0.268 0.269 0.269
## PopulatinVA 0.268 0.268 0.268 0.268 0.269 0.269 0.268
## PopulatinYE 0.267 0.268 0.269 0.268 0.269 0.269 0.268 0.268
## quartz_off_screen
## 2
## quartz_off_screen
## 2
## quartz_off_screen
## 2
## quartz_off_screen
## 2
LS_L_F_Pasyukova_lmer <- lmer(LSL_AgeAtDeath_days ~ -1 + Population + (1|Batch) + (1|Population:Line) + (1|Line:ReplicateVial), data = filter(d_LS_L_F, Censor == "0" & Supervisor.PI == "Pasyukova"))
capture.output(summary(LS_L_F_Pasyukova_lmer),file = "Lifespan/LS_L_F_Pasyukova_lmer_sum.txt")
capture.output(anova(LS_L_F_Pasyukova_lmer),file = "Lifespan/LS_L_F_Pasyukova_lmer.txt")
capture.output(emmeans(LS_L_F_Pasyukova_lmer, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "Lifespan/LS_L_F_Pasyukova_lmer_tk.txt")
anova(LS_L_F_Pasyukova_lmer)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 263591 29288 9 2 139.58 0.007133 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(LS_L_F_Pasyukova_lmer)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula:
## LSL_AgeAtDeath_days ~ -1 + Population + (1 | Batch) + (1 | Population:Line) +
## (1 | Line:ReplicateVial)
## Data: filter(d_LS_L_F, Censor == "0" & Supervisor.PI == "Pasyukova")
##
## REML criterion at convergence: 112305.7
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.4209 -0.5713 0.0810 0.6441 3.8348
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:ReplicateVial (Intercept) 39.803 6.309
## Population:Line (Intercept) 24.787 4.979
## Batch (Intercept) 2.667 1.633
## Residual 209.826 14.485
## Number of obs: 13520, groups:
## Line:ReplicateVial, 1352; Population:Line, 169; Batch, 2
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 43.977 1.676 4.106 26.24 9.95e-06 ***
## PopulationGI 43.844 1.956 7.527 22.41 3.64e-08 ***
## PopulationKA 46.763 1.719 4.541 27.20 3.33e-06 ***
## PopulationMA 43.617 1.719 4.541 25.37 4.56e-06 ***
## PopulationMU 43.921 1.719 4.541 25.55 4.42e-06 ***
## PopulationRE 44.179 1.833 5.842 24.10 4.51e-07 ***
## PopulationUM 39.324 1.771 5.100 22.21 2.85e-06 ***
## PopulationVA 44.056 1.719 4.541 25.62 4.36e-06 ***
## PopulationYE 41.305 1.719 4.541 24.02 5.83e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.408
## PopulatinKA 0.464 0.397
## PopulatinMA 0.464 0.397 0.452
## PopulatinMU 0.464 0.397 0.452 0.452
## PopulatinRE 0.435 0.373 0.424 0.424 0.424
## PopulatinUM 0.450 0.386 0.439 0.439 0.439 0.412
## PopulatinVA 0.464 0.397 0.452 0.452 0.452 0.424 0.439
## PopulatinYE 0.464 0.397 0.452 0.452 0.452 0.424 0.439 0.452
LS_L_M_Pasyukova_lmer <- lmer(LSL_AgeAtDeath_days ~ -1 + Population + (1|Batch) + (1|Population:Line) + (1|Line:ReplicateVial), data = filter(d_LS_L_M, Censor == "0" & Supervisor.PI == "Pasyukova"))
## Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
## Model failed to converge with max|grad| = 0.00449967 (tol = 0.002, component 1)
capture.output(summary(LS_L_M_Pasyukova_lmer),file = "Lifespan/LS_L_M_Pasyukova_lmer_sum.txt")
capture.output(anova(LS_L_M_Pasyukova_lmer),file = "Lifespan/LS_L_M_Pasyukova_lmer.txt")
capture.output(emmeans(LS_L_M_Pasyukova_lmer, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "Lifespan/LS_L_M_Pasyukova_lmer_tk.txt")
anova(LS_L_M_Pasyukova_lmer)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 730175 81131 9 2 290.93 0.00343 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(LS_L_M_Pasyukova_lmer)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula:
## LSL_AgeAtDeath_days ~ -1 + Population + (1 | Batch) + (1 | Population:Line) +
## (1 | Line:ReplicateVial)
## Data: filter(d_LS_L_M, Censor == "0" & Supervisor.PI == "Pasyukova")
##
## REML criterion at convergence: 116093.1
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -4.0485 -0.5537 0.0609 0.6453 2.8822
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:ReplicateVial (Intercept) 49.623 7.044
## Population:Line (Intercept) 31.736 5.633
## Batch (Intercept) 1.325 1.151
## Residual 278.870 16.699
## Number of obs: 13520, groups:
## Line:ReplicateVial, 1352; Population:Line, 169; Batch, 2
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 50.476 1.597 11.820 31.62 8.68e-13 ***
## PopulationGI 47.763 1.963 25.115 24.33 < 2e-16 ***
## PopulationKA 53.509 1.654 13.517 32.34 3.38e-14 ***
## PopulationMA 47.559 1.654 13.517 28.75 1.63e-13 ***
## PopulationMU 50.604 1.654 13.517 30.59 7.12e-14 ***
## PopulationRE 48.307 1.804 18.608 26.77 2.56e-16 ***
## PopulationUM 43.614 1.723 15.707 25.32 3.70e-14 ***
## PopulationVA 49.283 1.654 13.517 29.79 1.01e-13 ***
## PopulationYE 44.476 1.654 13.517 26.88 3.97e-13 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.213
## PopulatinKA 0.252 0.205
## PopulatinMA 0.252 0.205 0.243
## PopulatinMU 0.252 0.205 0.243 0.243
## PopulatinRE 0.231 0.188 0.223 0.223 0.223
## PopulatinUM 0.242 0.197 0.234 0.234 0.234 0.214
## PopulatinVA 0.252 0.205 0.243 0.243 0.243 0.223 0.234
## PopulatinYE 0.252 0.205 0.243 0.243 0.243 0.223 0.234 0.243
## optimizer (nloptwrap) convergence code: 0 (OK)
## Model failed to converge with max|grad| = 0.00449967 (tol = 0.002, component 1)
## quartz_off_screen
## 2
## quartz_off_screen
## 2
## quartz_off_screen
## 2
## quartz_off_screen
## 2
d_LS_P_surv <- d_LS_P %>% mutate(Censor = ifelse(Censor == 0, 1, 0))
d_LS_L_surv <- d_LS_L %>% mutate(Censor = ifelse(Censor == 0, 1, 0))
LS_F_Flatt_survfit <- survfit(Surv(LSP_AgeAtDeath_days) ~ Population, data = filter(d_LS_P_surv, Supervisor.PI == "Flatt", Sex == "F"))
p_LS_F_Flatt_survfit <- ggsurvplot(LS_F_Flatt_survfit, censor.shape="|", censor.size = 0, pval = FALSE, risk.table = FALSE, conf.int = FALSE, legend.title = "Population", legend.labs = sort(c("YE","RE","GI","MU","MA","UM","KA","VA","AK")), legend = c(0.9, 0.7), title = "LS_F_Flatt_survfit")
p_LS_F_Flatt_survfit$plot
pdf(file="Lifespan/p_LS_F_Flatt_survfit.pdf", width=8, height=5)
p_LS_F_Flatt_survfit$plot
invisible(dev.off())
LS_M_Flatt_survfit <- survfit(Surv(LSP_AgeAtDeath_days) ~ Population, data = filter(d_LS_P_surv, Supervisor.PI == "Flatt", Sex == "M"))
p_LS_M_Flatt_survfit <- ggsurvplot(LS_M_Flatt_survfit, censor.shape="|", censor.size = 0, pval = FALSE, risk.table = FALSE, conf.int = FALSE, legend.title = "Population", legend.labs = sort(c("YE","RE","GI","MU","MA","UM","KA","VA","AK")), legend = c(0.9, 0.7), title = "LS_M_Flatt_survfit")
p_LS_M_Flatt_survfit$plot
pdf(file="Lifespan/p_LS_M_Flatt_survfit.pdf", width=8, height=5)
p_LS_M_Flatt_survfit$plot
invisible(dev.off())
LS_F_Parsch_survfit <- survfit(Surv(LSL_AgeAtDeath_days) ~ Population, data = filter(d_LS_L_surv, Supervisor.PI == "Parsch", Sex == "F"))
p_LS_F_Parsch_survfit <- ggsurvplot(LS_F_Parsch_survfit, censor.shape="|", censor.size = 0, pval = FALSE, risk.table = FALSE, conf.int = FALSE, legend.title = "Population", legend.labs = sort(c("YE","RE","GI","MU","MA","UM","KA","VA","AK")), legend = c(0.9, 0.7), title = "LS_F_Parsch_survfit")
p_LS_F_Parsch_survfit$plot
pdf(file="Lifespan/p_LS_F_Parsch_survfit.pdf", width=8, height=5)
p_LS_F_Parsch_survfit$plot
invisible(dev.off())
LS_M_Parsch_survfit <- survfit(Surv(LSL_AgeAtDeath_days) ~ Population, data = filter(d_LS_L_surv, Supervisor.PI == "Parsch", Sex == "M"))
p_LS_M_Parsch_survfit <- ggsurvplot(LS_M_Parsch_survfit, censor.shape="|", censor.size = 0, pval = FALSE, risk.table = FALSE, conf.int = FALSE, legend.title = "Population", legend.labs = sort(c("YE","RE","GI","MU","MA","UM","KA","VA","AK")), legend = c(0.9, 0.7), title = "LS_M_Parsch_survfit")
p_LS_M_Parsch_survfit$plot
pdf(file="Lifespan/p_LS_M_Parsch_survfit.pdf", width=8, height=5)
p_LS_M_Parsch_survfit$plot
invisible(dev.off())
LS_F_Pasyukova_survfit <- survfit(Surv(LSL_AgeAtDeath_days) ~ Population, data = filter(d_LS_L_surv, Supervisor.PI == "Pasyukova", Sex == "F"))
p_LS_F_Pasyukova_survfit <- ggsurvplot(LS_F_Pasyukova_survfit, censor.shape="|", censor.size = 0, pval = FALSE, risk.table = FALSE, conf.int = FALSE, legend.title = "Population", legend.labs = sort(c("YE","RE","GI","MU","MA","UM","KA","VA","AK")), legend = c(0.9, 0.7), title = "LS_F_Pasyukova_survfit")
p_LS_F_Pasyukova_survfit$plot
pdf(file="Lifespan/p_LS_F_Pasyukova_survfit.pdf", width=8, height=5)
p_LS_F_Pasyukova_survfit$plot
invisible(dev.off())
LS_M_Pasyukova_survfit <- survfit(Surv(LSL_AgeAtDeath_days) ~ Population, data = filter(d_LS_L_surv, Supervisor.PI == "Pasyukova", Sex == "M"))
p_LS_M_Pasyukova_survfit <- ggsurvplot(LS_M_Pasyukova_survfit, censor.shape="|", censor.size = 0, pval = FALSE, risk.table = FALSE, conf.int = FALSE, legend.title = "Population", legend.labs = sort(c("YE","RE","GI","MU","MA","UM","KA","VA","AK")), legend = c(0.9, 0.7), title = "LS_M_Pasyukova_survfit")
p_LS_M_Pasyukova_survfit$plot
pdf(file="Lifespan/p_LS_M_Pasyukova_survfit.pdf", width=8, height=5)
p_LS_M_Pasyukova_survfit$plot
invisible(dev.off())
LS_P_F_coxme_Flatt <- coxme(Surv(LSP_AgeAtDeath_days, Censor) ~ Population + (1|Population/ReplicateCage), data = filter(d_LS_P_surv, Supervisor.PI == "Flatt", Sex == "F"))
capture.output(summary(LS_P_F_coxme_Flatt), file = "Starvation/LS_P_F_coxme_Flatt_sum.txt")
capture.output(anova(LS_P_F_coxme_Flatt), file = "Starvation/LS_P_F_coxme_Flatt.txt")
LS_P_M_coxme_Flatt <- coxme(Surv(LSP_AgeAtDeath_days, Censor) ~ Population + (1|Population/ReplicateCage), data = filter(d_LS_P_surv, Supervisor.PI == "Flatt", Sex == "M"))
capture.output(summary(LS_P_M_coxme_Flatt), file = "Starvation/LS_P_M_coxme_Flatt_sum.txt")
capture.output(anova(LS_P_M_coxme_Flatt), file = "Starvation/LS_P_M_coxme_Flatt")
LS_L_F_coxme_Parsch <- coxme(Surv(AgeAtDeath_hours, Censor) ~ Population + (1|Batch) + (1|Population/Line) + (1|Population/Line/ReplicateVial), data = filter(d_LS_L_surv, Supervisor.PI == "Parsch", Sex == "F"))
capture.output(summary(LS_L_F_coxme_Parsch), file = "Starvation/LS_L_F_coxme_Parsch_sum.txt")
capture.output(anova(LS_L_F_coxme_Parsch), file = "Starvation/LS_L_F_coxme_Parsch.txt")
LS_L_M_coxme_Parsch <- coxme(Surv(AgeAtDeath_hours, Censor) ~ Population + (1|Batch) + (1|Population/Line) + (1|Population/Line/ReplicateVial), data = filter(d_LS_L_surv, Supervisor.PI == "Parsch", Sex == "M"))
capture.output(summary(LS_L_M_coxme_Parsch), file = "Starvation/LS_L_M_coxme_Parsch_sum.txt")
capture.output(anova(LS_L_M_coxme_Parsch), file = "Starvation/LS_L_M_coxme_Parsch.txt")
LS_L_F_coxme_Pasyukova <- coxme(Surv(AgeAtDeath_hours, Censor) ~ Population + (1|Batch) + (1|Population/Line) + (1|Population/Line/ReplicateVial), data = filter(d_LS_L_surv, Supervisor.PI == "Pasyukova", Sex == "F"))
capture.output(summary(LS_L_F_coxme_Pasyukova), file = "Starvation/LS_L_F_coxme_Pasyukova_sum.txt")
capture.output(anova(LS_L_F_coxme_Pasyukova), file = "Starvation/LS_L_F_coxme_Pasyukova.txt")
LS_L_M_coxme_Pasyukova <- coxme(Surv(AgeAtDeath_hours, Censor) ~ Population + (1|Batch) + (1|Population/Line) + (1|Population/Line/ReplicateVial), data = filter(d_LS_L_surv, Supervisor.PI == "Pasyukova", Sex == "M"))
capture.output(summary(LS_L_M_coxme_Pasyukova), file = "Starvation/LS_L_M_coxme_Pasyukova_sum.txt")
capture.output(anova(LS_L_M_coxme_Pasyukova), file = "Starvation/LS_L_M_coxme_Pasyukova.txt")
intersect_Line_LS <- intersect(d_LS_L$Line[d_LS_L$Supervisor.PI == "Parsch"],
d_LS_L$Line[d_LS_L$Supervisor.PI == "Pasyukova"])
write(intersect_Line_LS, file ="Lifespan/intersect_Line_LS", sep = "\t")
intersect_Pop_LS <- Reduce(intersect, list(d_LS_M$Population[d_LS_M$Supervisor.PI == "Parsch"],
d_LS_L$Line[d_LS_L$Supervisor.PI == "Flatt"],
d_LS_M$Population[d_LS_M$Supervisor.PI == "Pasyukova"]))
write(intersect_Pop_LS, file ="Lifespan/intersect_Pop_LS", sep = "\t")
There are 0 populations and 133 isofemale lines that have been phenotyped across the labs. Please refer to tables named intersect_Trait_level (i.e. intersect_Via_pop) for details.
LS_fitted <- combineFitted(labs = rep(c("Flatt", "Parsch", "Pasyukova"), 2), sex = rep(c("F", "M"), each = 3), models = list(LS_P_F_Flatt_lmer, LS_L_F_Parsch_lmer, LS_L_F_Pasyukova_lmer, LS_P_M_Flatt_lmer, LS_L_M_Parsch_lmer, LS_L_M_Pasyukova_lmer))
p_LS_F_lab_cor <- function() scatterPlotMatrix(LS_fitted, sex = "F")
p_LS_M_lab_cor <- function() scatterPlotMatrix(LS_fitted, sex = "M")
p_LS_F_lab_cor()
pdf(file="Lifespan/p_LS_F_lab_cor.pdf",width=8, height=8)
p_LS_F_lab_cor()
invisible(dev.off())
p_LS_M_lab_cor()
pdf(file="Lifespan/p_LS_M_lab_cor.pdf",width=8, height=8)
p_LS_M_lab_cor()
invisible(dev.off())
dir.create(file.path("ColdShock"), showWarnings = FALSE)
For a detailed description of tables, plots, linear models and outputs, please refer here
Gonzalez Lab : Llewellyn Green, Josefa Gonzalez, Miriam Merenciano
Kozeretska Lab : Svitlana Serga, Alexandra Protsenko, Oleksandr Maistrenko, Iryna Kozeretska
Vieira Lab : Jorge Vieira, Cristina P. Vieira, Pedro Duque, Tânia Dias
d_CSM <- read.csv("MasterSheets_Oct21_git/CSM_MasterSheet_Oct21.csv")
str(d_CSM)
## 'data.frame': 2584 obs. of 16 variables:
## $ Supervisor.PI : chr "Gonzalez" "Gonzalez" "Gonzalez" "Gonzalez" ...
## $ Diet : chr "S" "S" "S" "S" ...
## $ Batch : int 1 2 3 1 3 4 1 2 3 1 ...
## $ Population : chr "AK" "AK" "AK" "AK" ...
## $ Line : chr "AK1" "AK1" "AK1" "AK10" ...
## $ Sex : chr "M" "M" "M" "M" ...
## $ ReplicateVialOld: int 1 2 3 1 2 3 1 2 3 1 ...
## $ ReplicateVial : chr "Gonzalez_1_AK1_M_1" "Gonzalez_2_AK1_M_2" "Gonzalez_3_AK1_M_3" "Gonzalez_1_AK10_M_1" ...
## $ Total : int 20 19 18 20 20 20 16 20 18 16 ...
## $ Dead : int 14 11 3 16 4 11 8 17 4 16 ...
## $ CSM_PropDead : num 70 57.9 16.7 80 20 55 50 85 22.2 100 ...
## $ CSM_PropDead_ED : num 0.7 0.579 0.167 0.8 0.2 ...
## $ Country : chr "Finland" "Finland" "Finland" "Finland" ...
## $ Latitude : num 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 ...
## $ Longitude : num 23.5 23.5 23.5 23.5 23.5 ...
## $ Altitude : int 88 88 88 88 88 88 88 88 88 88 ...
d_CSM$Supervisor.PI <- as.factor(d_CSM$Supervisor.PI)
d_CSM$Diet <- as.factor(d_CSM$Diet)
d_CSM$Batch <- as.factor(d_CSM$Batch)
d_CSM$Population_Lat <- factor(d_CSM$Population, levels= c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))
d_CSM$Population_Lon <- factor(d_CSM$Population, levels= c("RE","GI","KA","MU","MA","AK","UM","YE","VA"))
d_CSM$Population_Alt <- factor(d_CSM$Population, levels= c("KA","AK","GI","RE","UM","VA","MU","MA","YE"))
d_CSM$Line <- as.factor(d_CSM$Line)
d_CSM$Sex <- as.factor(d_CSM$Sex)
d_CSM$ReplicateVial <- as.factor(d_CSM$ReplicateVial)
d_CSM$CSM_PropDead_ED <- as.numeric(d_CSM$CSM_PropDead_ED)
str(d_CSM)
## 'data.frame': 2584 obs. of 19 variables:
## $ Supervisor.PI : Factor w/ 3 levels "Gonzalez","Kozeretska",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Diet : Factor w/ 2 levels "NS","S": 2 2 2 2 2 2 2 2 2 2 ...
## $ Batch : Factor w/ 32 levels "1","2","3","4",..: 1 2 3 1 3 4 1 2 3 1 ...
## $ Population : chr "AK" "AK" "AK" "AK" ...
## $ Line : Factor w/ 172 levels "AK1","AK10","AK11",..: 1 1 1 2 2 2 3 3 3 4 ...
## $ Sex : Factor w/ 2 levels "F","M": 2 2 2 2 2 2 2 2 2 2 ...
## $ ReplicateVialOld: int 1 2 3 1 2 3 1 2 3 1 ...
## $ ReplicateVial : Factor w/ 2584 levels "Gonzalez_1_AK1_F_1",..: 2 152 342 4 344 584 6 154 346 8 ...
## $ Total : int 20 19 18 20 20 20 16 20 18 16 ...
## $ Dead : int 14 11 3 16 4 11 8 17 4 16 ...
## $ CSM_PropDead : num 70 57.9 16.7 80 20 55 50 85 22.2 100 ...
## $ CSM_PropDead_ED : num 0.7 0.579 0.167 0.8 0.2 ...
## $ Country : chr "Finland" "Finland" "Finland" "Finland" ...
## $ Latitude : num 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 ...
## $ Longitude : num 23.5 23.5 23.5 23.5 23.5 ...
## $ Altitude : int 88 88 88 88 88 88 88 88 88 88 ...
## $ Population_Lat : Factor w/ 9 levels "YE","RE","GI",..: 9 9 9 9 9 9 9 9 9 9 ...
## $ Population_Lon : Factor w/ 9 levels "RE","GI","KA",..: 6 6 6 6 6 6 6 6 6 6 ...
## $ Population_Alt : Factor w/ 9 levels "KA","AK","GI",..: 2 2 2 2 2 2 2 2 2 2 ...
d_CSM_F <-subset(d_CSM,Sex=='F')
d_CSM_M <-subset(d_CSM,Sex=='M')
Descriptive statistics at the line level, with batch information :
table_CSM_Line_wbatch <- write.csv(d_CSM %>% group_by(Supervisor.PI, Batch, Sex,Population, Line) %>%
summarise_at(vars(CSM_PropDead_ED),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "ColdShock/table_CSM_Line_wbatch.csv", row.names = T)
table_CSM_Line_wbatch <- read.csv("ColdShock/table_CSM_Line_wbatch.csv")
Descriptive statistics at the line level, without batch information :
table_CSM_Line_wobatch <- write.csv(d_CSM %>% group_by(Supervisor.PI, Sex,Population, Line) %>%
summarise_at(vars(CSM_PropDead_ED),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "ColdShock/table_CSM_Line_wobatch.csv", row.names = T)
table_CSM_Line_wobatch <- read.csv("ColdShock/table_CSM_Line_wobatch.csv")
Descriptive statistics at the population level, with batch information :
table_CSM_Pop_wbatch <- write.csv(d_CSM %>% group_by(Supervisor.PI, Batch, Sex, Population) %>%
summarise_at(vars(CSM_PropDead_ED),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "ColdShock/table_CSM_Pop_wbatch.csv", row.names = T)
table_CSM_Pop_wbatch <- read.csv("ColdShock/table_CSM_Pop_wbatch.csv")
Descriptive statistics at the population level, without batch information :
table_CSM_Pop_wobatch <- write.csv(d_CSM %>% group_by(Supervisor.PI, Sex, Population) %>%
summarise_at(vars(CSM_PropDead_ED),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "ColdShock/table_CSM_Pop_wobatch.csv", row.names = T)
table_CSM_Pop_wobatch <- read.csv("ColdShock/table_CSM_Pop_wobatch.csv")
min_CSM <- min(d_CSM$CSM_PropDead_ED)
max_CSM <- max(d_CSM$CSM_PropDead_ED)
y-axis is scaled by the minimum (0) and maximum (1) values in the full data set.
p_CSM_F <- ggplot(data = d_CSM_F, aes(x=Population_Lat, y=CSM_PropDead_ED, fill=Supervisor.PI)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_CSM_F", x="Population", y = "Prop_dead") + ylim(c(min_CSM, max_CSM))+ droseu_theme
p_CSM_F
pdf(file="ColdShock/p_CSM_F.pdf",width=8, height=5)
p_CSM_F
dev.off()
## quartz_off_screen
## 2
p_CSM_M <- ggplot(data = d_CSM_M, aes(x=Population_Lat, y=CSM_PropDead_ED, fill=Supervisor.PI)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_CSM_M", x="Population", y = "Prop_dead") + ylim(c(min_CSM, max_CSM))+ droseu_theme
p_CSM_M
pdf(file="ColdShock/p_CSM_M.pdf",width=8, height=5)
p_CSM_M
dev.off()
## quartz_off_screen
## 2
CSM_F_lmer_Gonzalez <- lmer(CSM_PropDead_ED ~ -1 + Population + (1| Line : Population) +
(1|Batch), data = d_CSM_F[d_CSM_F$Supervisor.PI == "Gonzalez",])
capture.output(summary(CSM_F_lmer_Gonzalez),file = "ColdShock/CSM_F_lmer_sum_Gonzalez.txt")
capture.output(anova(CSM_F_lmer_Gonzalez),file = "ColdShock/CSM_F_lmer_Gonzalez.txt")
capture.output(emmeans(CSM_F_lmer_Gonzalez, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "ColdShock/CSM_F_lmer_Gonzalez_tk.txt")
anova(CSM_F_lmer_Gonzalez)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 17.836 1.9818 9 52.799 139.46 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(CSM_F_lmer_Gonzalez)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: CSM_PropDead_ED ~ -1 + Population + (1 | Line:Population) + (1 |
## Batch)
## Data: d_CSM_F[d_CSM_F$Supervisor.PI == "Gonzalez", ]
##
## REML criterion at convergence: -520.5
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -5.5262 -0.3749 0.0953 0.5610 2.1847
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 0.009816 0.09908
## Batch (Intercept) 0.004154 0.06446
## Residual 0.014210 0.11921
## Number of obs: 544, groups: Line:Population, 160; Batch, 9
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 0.90153 0.03466 38.43295 26.01 <2e-16 ***
## PopulationGI 0.77871 0.03837 53.62814 20.29 <2e-16 ***
## PopulationKA 0.85685 0.03771 50.33708 22.72 <2e-16 ***
## PopulationMA 0.85223 0.03478 39.43863 24.50 <2e-16 ***
## PopulationMU 0.88218 0.03498 40.02650 25.22 <2e-16 ***
## PopulationRE 0.84133 0.03679 47.51782 22.87 <2e-16 ***
## PopulationUM 0.77992 0.03896 56.11118 20.02 <2e-16 ***
## PopulationVA 0.83379 0.03497 39.55000 23.85 <2e-16 ***
## PopulationYE 0.87437 0.03441 37.97353 25.41 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.380
## PopulatinKA 0.382 0.347
## PopulatinMA 0.410 0.373 0.376
## PopulatinMU 0.414 0.375 0.378 0.406
## PopulatinRE 0.378 0.343 0.349 0.376 0.375
## PopulatinUM 0.370 0.336 0.338 0.364 0.366 0.336
## PopulatinVA 0.420 0.380 0.381 0.409 0.414 0.376 0.369
## PopulatinYE 0.408 0.371 0.377 0.406 0.405 0.380 0.364 0.406
CSM_M_lmer_Gonzalez <- lmer(CSM_PropDead_ED ~ -1 + Population + (1| Line : Population) +
(1|Batch), data = d_CSM_M[d_CSM_M$Supervisor.PI == "Gonzalez",])
capture.output(summary(CSM_M_lmer_Gonzalez),file = "ColdShock/CSM_M_lmer_sum_Gonzalez.txt")
capture.output(anova(CSM_M_lmer_Gonzalez),file = "ColdShock/CSM_M_lmer_Gonzalez.txt")
capture.output(emmeans(CSM_M_lmer_Gonzalez, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "ColdShock/CSM_M_lmer_Gonzalez_tk.txt")
anova(CSM_M_lmer_Gonzalez)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 4.0718 0.45242 9 46.507 14.742 6.315e-11 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(CSM_M_lmer_Gonzalez)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: CSM_PropDead_ED ~ -1 + Population + (1 | Line:Population) + (1 |
## Batch)
## Data: d_CSM_M[d_CSM_M$Supervisor.PI == "Gonzalez", ]
##
## REML criterion at convergence: -119.7
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.2121 -0.6190 0.0413 0.5522 2.3695
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 0.01754 0.1324
## Batch (Intercept) 0.02650 0.1628
## Residual 0.03069 0.1752
## Number of obs: 544, groups: Line:Population, 160; Batch, 9
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 0.58500 0.06612 16.18080 8.848 1.34e-07 ***
## PopulationGI 0.63730 0.07001 20.14264 9.103 1.41e-08 ***
## PopulationKA 0.66190 0.06920 19.25441 9.565 9.48e-09 ***
## PopulationMA 0.61389 0.06626 16.34959 9.265 6.54e-08 ***
## PopulationMU 0.59773 0.06647 16.54743 8.992 8.96e-08 ***
## PopulationRE 0.59781 0.06817 18.25751 8.769 5.77e-08 ***
## PopulationUM 0.53765 0.07054 20.73466 7.622 1.93e-07 ***
## PopulationVA 0.56016 0.06648 16.52017 8.426 2.21e-07 ***
## PopulationYE 0.71131 0.06582 15.93957 10.806 9.61e-09 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.660
## PopulatinKA 0.664 0.629
## PopulatinMA 0.691 0.655 0.660
## PopulatinMU 0.693 0.655 0.660 0.687
## PopulatinRE 0.665 0.630 0.637 0.663 0.662
## PopulatinUM 0.652 0.617 0.622 0.647 0.648 0.623
## PopulatinVA 0.696 0.658 0.662 0.689 0.691 0.662 0.650
## PopulatinYE 0.692 0.655 0.663 0.690 0.688 0.668 0.649 0.689
p_CSM_F_Gonzalez <- ggplot(data = (subset(d_CSM_F, Supervisor.PI == "Gonzalez")), aes(x=Population_Lat, y=CSM_PropDead_ED, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_CSM_F_Gonzalez", x="Population", y = "CSM (PropSur)") + ylim(c(min_CSM, max_CSM))+ droseu_theme
p_CSM_F_Gonzalez
pdf(file="ColdShock/p_CSM_F_Gonzalez.pdf",width=8, height=5)
p_CSM_F_Gonzalez
dev.off()
## quartz_off_screen
## 2
p_CSM_F_pop_Gonzalez <- ggplot(data = (subset(d_CSM_F, Supervisor.PI == "Gonzalez")), aes(x=Population_Lat, y=CSM_PropDead_ED, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_CSM_F_pop_Gonzalez", x="Population", y = "CSM (PropSur)") + ylim(c(min_CSM, max_CSM))+ droseu_theme
p_CSM_F_pop_Gonzalez
pdf(file="ColdShock/p_CSM_F_pop_Gonzalez.pdf",width=8, height=5)
p_CSM_F_pop_Gonzalez
dev.off()
## quartz_off_screen
## 2
p_CSM_M_Gonzalez <- ggplot(data = (subset(d_CSM_M, Supervisor.PI == "Gonzalez")), aes(x=Population_Lat, y=CSM_PropDead_ED, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_CSM_M_Gonzalez", x="Population", y = "CSM (PropSur)") + ylim(c(min_CSM, max_CSM))+ droseu_theme
p_CSM_M_Gonzalez
pdf(file="ColdShock/p_CSM_M_Gonzalez.pdf",width=8, height=5)
p_CSM_M_Gonzalez
dev.off()
## quartz_off_screen
## 2
p_CSM_M_pop_Gonzalez <- ggplot(data = (subset(d_CSM_M, Supervisor.PI == "Gonzalez")), aes(x=Population_Lat, y=CSM_PropDead_ED, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_CSM_M_pop_Gonzalez", x="Population", y = "CSM (PropSur)") + ylim(c(min_CSM, max_CSM))+ droseu_theme
p_CSM_M_pop_Gonzalez
pdf(file="ColdShock/p_CSM_M_pop_Gonzalez.pdf",width=8, height=5)
p_CSM_M_pop_Gonzalez
dev.off()
## quartz_off_screen
## 2
CSM_F_lmer_Kozeretska <- lmer(CSM_PropDead_ED ~ -1 + Population + (1| Line : Population) +
(1|Batch), data = d_CSM_F[d_CSM_F$Supervisor.PI == "Kozeretska",])
capture.output(summary(CSM_F_lmer_Kozeretska),file = "ColdShock/CSM_F_lmer_sum_Kozeretska.txt")
capture.output(anova(CSM_F_lmer_Kozeretska),file = "ColdShock/CSM_F_lmer_Kozeretska.txt")
capture.output(emmeans(CSM_F_lmer_Kozeretska, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "ColdShock/CSM_F_lmer_Kozeretska_tk.txt")
anova(CSM_F_lmer_Kozeretska)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 2.2818 0.25353 9 2 3.26 0.2568
summary(CSM_F_lmer_Kozeretska)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: CSM_PropDead_ED ~ -1 + Population + (1 | Line:Population) + (1 |
## Batch)
## Data: d_CSM_F[d_CSM_F$Supervisor.PI == "Kozeretska", ]
##
## REML criterion at convergence: 134
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -1.6679 -0.7659 -0.1923 0.7403 2.0452
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 0.01410 0.1188
## Batch (Intercept) 0.01886 0.1373
## Residual 0.07777 0.2789
## Number of obs: 244, groups: Line:Population, 130; Batch, 2
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 0.5828 0.1126 1.5833 5.174 0.0563 .
## PopulationGI 0.5178 0.1265 2.5161 4.093 0.0366 *
## PopulationKA 0.4528 0.1183 1.9321 3.826 0.0655 .
## PopulationMA 0.4791 0.1148 1.7063 4.173 0.0690 .
## PopulationMU 0.5249 0.1140 1.6577 4.605 0.0620 .
## PopulationRE 0.4998 0.1182 1.9225 4.228 0.0553 .
## PopulationUM 0.4336 0.1206 2.0744 3.595 0.0657 .
## PopulationVA 0.5057 0.1122 1.5551 4.506 0.0715 .
## PopulationYE 0.5176 0.1180 1.9080 4.385 0.0525 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.670
## PopulatinKA 0.708 0.630
## PopulatinMA 0.746 0.659 0.695
## PopulatinMU 0.752 0.664 0.700 0.742
## PopulatinRE 0.716 0.635 0.674 0.704 0.709
## PopulatinUM 0.710 0.627 0.662 0.700 0.705 0.670
## PopulatinVA 0.768 0.677 0.711 0.758 0.764 0.723 0.721
## PopulatinYE 0.723 0.640 0.676 0.713 0.718 0.683 0.678 0.734
CSM_M_lmer_Kozeretska <- lmer(CSM_PropDead_ED ~ -1 + Population + (1| Line : Population) +
(1|Batch), data = d_CSM_M[d_CSM_M$Supervisor.PI == "Kozeretska",])
capture.output(summary(CSM_M_lmer_Kozeretska),file = "ColdShock/CSM_M_lmer_sum_Kozeretska.txt")
capture.output(anova(CSM_M_lmer_Kozeretska),file = "ColdShock/CSM_M_lmer_Kozeretska.txt")
capture.output(emmeans(CSM_M_lmer_Kozeretska, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "ColdShock/CSM_M_tk_Kozeretska_tk.txt")
anova(CSM_M_lmer_Kozeretska)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 4.7634 0.52927 9 2 6.8565 0.1337
summary(CSM_M_lmer_Kozeretska)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: CSM_PropDead_ED ~ -1 + Population + (1 | Line:Population) + (1 |
## Batch)
## Data: d_CSM_M[d_CSM_M$Supervisor.PI == "Kozeretska", ]
##
## REML criterion at convergence: 108.2
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.3573 -0.7476 0.1784 0.7742 1.5219
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 0.003936 0.06274
## Batch (Intercept) 0.017486 0.13223
## Residual 0.077193 0.27784
## Number of obs: 244, groups: Line:Population, 130; Batch, 2
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 0.7641 0.1067 1.5015 7.162 0.0387 *
## PopulationGI 0.7930 0.1187 2.3020 6.679 0.0149 *
## PopulationKA 0.6545 0.1115 1.7946 5.869 0.0356 *
## PopulationMA 0.7342 0.1086 1.6100 6.761 0.0360 *
## PopulationMU 0.6656 0.1079 1.5662 6.172 0.0440 *
## PopulationRE 0.6864 0.1112 1.7735 6.173 0.0335 *
## PopulationUM 0.6538 0.1133 1.9053 5.772 0.0321 *
## PopulationVA 0.6958 0.1063 1.4737 6.548 0.0459 *
## PopulationYE 0.7831 0.1115 1.7895 7.024 0.0262 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.698
## PopulatinKA 0.736 0.661
## PopulatinMA 0.770 0.688 0.723
## PopulatinMU 0.776 0.693 0.728 0.766
## PopulatinRE 0.744 0.667 0.706 0.733 0.738
## PopulatinUM 0.738 0.659 0.693 0.728 0.734 0.702
## PopulatinVA 0.791 0.706 0.739 0.782 0.788 0.752 0.749
## PopulatinYE 0.748 0.669 0.704 0.738 0.744 0.713 0.707 0.759
p_CSM_F_Kozeretska <- ggplot(data = (subset(d_CSM_F, Supervisor.PI == "Kozeretska")), aes(x=Population_Lat, y=CSM_PropDead_ED, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_CSM_F_Kozeretska", x="Population", y = "CSM (PropSur)") + ylim(c(min_CSM, max_CSM))+ droseu_theme
p_CSM_F_Kozeretska
pdf(file="ColdShock/p_CSM_F_Kozeretska.pdf",width=8, height=5)
p_CSM_F_Kozeretska
dev.off()
## quartz_off_screen
## 2
p_CSM_F_pop_Kozeretska <- ggplot(data = (subset(d_CSM_F, Supervisor.PI == "Kozeretska")), aes(x=Population_Lat, y=CSM_PropDead_ED, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_CSM_F_pop_Kozeretska", x="Population", y = "CSM (PropSur)") + ylim(c(min_CSM, max_CSM))+ droseu_theme
p_CSM_F_pop_Kozeretska
pdf(file="ColdShock/p_CSM_F_pop_Kozeretska.pdf",width=8, height=5)
p_CSM_F_pop_Kozeretska
dev.off()
## quartz_off_screen
## 2
p_CSM_M_Kozeretska <- ggplot(data = (subset(d_CSM_M, Supervisor.PI == "Kozeretska")), aes(x=Population_Lat, y=CSM_PropDead_ED, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_CSM_M_Kozeretska", x="Population", y = "CSM (PropSur)") + ylim(c(min_CSM, max_CSM))+ droseu_theme
p_CSM_M_Kozeretska
pdf(file="ColdShock/p_CSM_M_Kozeretska.pdf",width=8, height=5)
p_CSM_M_Kozeretska
dev.off()
## quartz_off_screen
## 2
p_CSM_M_pop_Kozeretska <- ggplot(data = (subset(d_CSM_M, Supervisor.PI == "Kozeretska")), aes(x=Population_Lat, y=CSM_PropDead_ED, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_CSM_M_pop_Kozeretska", x="Population", y = "CSM (PropSur)") + ylim(c(min_CSM, max_CSM))+ droseu_theme
p_CSM_M_pop_Kozeretska
pdf(file="ColdShock/p_CSM_M_pop_Kozeretska.pdf",width=8, height=5)
p_CSM_M_pop_Kozeretska
dev.off()
## quartz_off_screen
## 2
CSM_F_lmer_Vieira <- lmer(CSM_PropDead_ED ~ -1 + Population + (1| Line : Population) +
(1|Batch), data = d_CSM_F[d_CSM_F$Supervisor.PI == "Vieira",])
capture.output(summary(CSM_F_lmer_Vieira),file = "ColdShock/CSM_F_lmer_sum_Vieira.txt")
capture.output(anova(CSM_F_lmer_Vieira),file = "ColdShock/CSM_F_lmer_Vieira.txt")
capture.output(emmeans(CSM_F_lmer_Vieira, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "ColdShock/CSM_F_lmer_Vieira_tk.txt")
anova(CSM_F_lmer_Vieira)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 69.384 7.7093 9 24.538 660.91 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(CSM_F_lmer_Vieira)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: CSM_PropDead_ED ~ -1 + Population + (1 | Line:Population) + (1 |
## Batch)
## Data: d_CSM_F[d_CSM_F$Supervisor.PI == "Vieira", ]
##
## REML criterion at convergence: -527.4
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -5.4994 -0.3263 0.1582 0.4377 2.3707
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 0.0125606 0.11207
## Batch (Intercept) 0.0008187 0.02861
## Residual 0.0116647 0.10800
## Number of obs: 504, groups: Line:Population, 168; Batch, 32
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 0.85973 0.03082 43.39219 27.90 < 2e-16 ***
## PopulationGI 0.84992 0.03775 60.10192 22.51 < 2e-16 ***
## PopulationKA 0.89367 0.03131 30.10543 28.54 < 2e-16 ***
## PopulationMA 0.86227 0.03164 22.95302 27.25 < 2e-16 ***
## PopulationMU 0.87931 0.03168 25.75001 27.76 < 2e-16 ***
## PopulationRE 0.86198 0.03582 18.21320 24.07 2.93e-15 ***
## PopulationUM 0.78922 0.03173 40.56536 24.87 < 2e-16 ***
## PopulationVA 0.93223 0.03202 19.67021 29.11 < 2e-16 ***
## PopulationYE 0.87808 0.03206 18.99480 27.39 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.037
## PopulatinKA 0.001 0.001
## PopulatinMA 0.000 0.000 0.007
## PopulatinMU 0.068 0.035 0.001 0.000
## PopulatinRE 0.000 0.000 0.011 0.000 0.000
## PopulatinUM 0.015 0.017 0.034 0.000 0.038 0.000
## PopulatinVA 0.000 0.000 0.000 0.001 0.000 0.000 0.000
## PopulatinYE 0.000 0.000 0.000 0.010 0.000 0.000 0.000 0.076
CSM_M_lmer_Vieira <- lmer(CSM_PropDead_ED ~ -1 + Population + (1| Line : Population) +
(1|Batch), data = d_CSM_M[d_CSM_M$Supervisor.PI == "Vieira",])
capture.output(summary(CSM_M_lmer_Vieira),file = "ColdShock/CSM_M_lmer_sum_Vieira.txt")
capture.output(anova(CSM_M_lmer_Vieira),file = "ColdShock/CSM_M_lmer_Vieira.txt")
capture.output(emmeans(CSM_M_lmer_Vieira, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "ColdShock/CSM_M_lmer_Vieira_tk.txt")
anova(CSM_M_lmer_Vieira)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 28.078 3.1198 9 44.934 169.51 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(CSM_M_lmer_Vieira)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: CSM_PropDead_ED ~ -1 + Population + (1 | Line:Population) + (1 |
## Batch)
## Data: d_CSM_M[d_CSM_M$Supervisor.PI == "Vieira", ]
##
## REML criterion at convergence: -249.1
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.8114 -0.3899 0.1187 0.4494 2.5947
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 0.027998 0.16733
## Batch (Intercept) 0.005384 0.07337
## Residual 0.018405 0.13566
## Number of obs: 504, groups: Line:Population, 168; Batch, 32
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 0.71755 0.04969 62.48430 14.44 < 2e-16 ***
## PopulationGI 0.72299 0.05985 79.14734 12.08 < 2e-16 ***
## PopulationKA 0.74224 0.05144 50.71725 14.43 < 2e-16 ***
## PopulationMA 0.71924 0.05311 37.18225 13.54 5.98e-16 ***
## PopulationMU 0.87253 0.05217 53.61528 16.73 < 2e-16 ***
## PopulationRE 0.76734 0.06113 30.70270 12.55 1.26e-13 ***
## PopulationUM 0.67972 0.05123 63.70981 13.27 < 2e-16 ***
## PopulationVA 0.78489 0.05407 36.19392 14.52 < 2e-16 ***
## PopulationYE 0.89860 0.05421 36.47581 16.58 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.103
## PopulatinKA 0.004 0.004
## PopulatinMA 0.000 0.000 0.023
## PopulatinMU 0.171 0.094 0.008 0.000
## PopulatinRE 0.000 0.000 0.032 0.001 0.000
## PopulatinUM 0.047 0.045 0.086 0.002 0.095 0.003
## PopulatinVA 0.000 0.000 0.000 0.006 0.000 0.000 0.000
## PopulatinYE 0.000 0.000 0.001 0.030 0.000 0.000 0.000 0.191
p_CSM_F_Vieira <- ggplot(data = (subset(d_CSM_F, Supervisor.PI == "Vieira")), aes(x=Population_Lat, y=CSM_PropDead_ED, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_CSM_F_Vieira", x="Population", y = "CSM (PropSur)") + ylim(c(min_CSM, max_CSM))+ droseu_theme
p_CSM_F_Vieira
pdf(file="ColdShock/p_CSM_F_Vieira.pdf",width=8, height=5)
p_CSM_F_Vieira
dev.off()
## quartz_off_screen
## 2
p_CSM_F_pop_Vieira <- ggplot(data = (subset(d_CSM_F, Supervisor.PI == "Vieira")), aes(x=Population_Lat, y=CSM_PropDead_ED, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_CSM_F_pop_Vieira", x="Population", y = "CSM (PropSur)") + ylim(c(min_CSM, max_CSM))+ droseu_theme
p_CSM_F_pop_Vieira
pdf(file="ColdShock/p_CSM_F_pop_Vieira.pdf",width=8, height=5)
p_CSM_F_pop_Vieira
dev.off()
## quartz_off_screen
## 2
p_CSM_M_Vieira <- ggplot(data = (subset(d_CSM_M, Supervisor.PI == "Vieira")), aes(x=Population_Lat, y=CSM_PropDead_ED, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_CSM_M_Vieira", x="Population", y = "CSM (PropSur)") + ylim(c(min_CSM, max_CSM))+ droseu_theme
p_CSM_M_Vieira
pdf(file="ColdShock/p_CSM_M_Vieira.pdf",width=8, height=5)
p_CSM_M_Vieira
dev.off()
## quartz_off_screen
## 2
p_CSM_M_pop_Vieira <- ggplot(data = (subset(d_CSM_M, Supervisor.PI == "Vieira")), aes(x=Population_Lat, y=CSM_PropDead_ED, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_CSM_M_pop_Vieira", x="Population", y = "CSM (PropSur)") + ylim(c(min_CSM, max_CSM))+ droseu_theme
p_CSM_M_pop_Vieira
pdf(file="ColdShock/p_CSM_M_pop_Vieira.pdf",width=8, height=5)
p_CSM_M_pop_Vieira
dev.off()
## quartz_off_screen
## 2
intersect_Line_CSM <- Reduce(intersect, list(d_CSM$Line[d_CSM$Supervisor.PI == "Gonzalez"],
d_CSM$Line[d_CSM$Supervisor.PI == "Vieira"],
d_CSM$Line[d_CSM$Supervisor.PI == "Kozeretska"]))
write(intersect_Line_CSM, file ="ColdShock/intersect_Line_CSM.txt", sep = "\t")
intersect_Pop_CSM <- Reduce(intersect, list(d_CSM$Population[d_CSM$Supervisor.PI == "Gonzalez"],
d_CSM$Population[d_CSM$Supervisor.PI == "Vieira"],
d_CSM$Population[d_CSM$Supervisor.PI == "Kozeretska"]))
write(intersect_Pop_CSM, file ="ColdShock/intersect_Pop_CSM.txt", sep = "\t")
There are 9 populations and 126 isofemale lines that have been phenotyped across the labs. Please refer to tables named intersect_Trait_level (i.e. intersect_Via_pop) for details.
CSM_fitted <- combineFitted(labs = rep(c("Gonzalez", "Kozeretska", "Vieira"), 2), sex = rep(c("F", "M"), each = 3), models = list(CSM_F_lmer_Gonzalez, CSM_F_lmer_Kozeretska, CSM_F_lmer_Vieira, CSM_M_lmer_Gonzalez, CSM_M_lmer_Kozeretska, CSM_M_lmer_Vieira))
p_CSM_F_lab_cor <- function() scatterPlotMatrix(CSM_fitted, sex = "F")
p_CSM_M_lab_cor <- function() scatterPlotMatrix(CSM_fitted, sex = "M")
p_CSM_F_lab_cor()
pdf(file="ColdShock/p_CSM_F_lab_cor.pdf", width=8, height=8)
p_CSM_F_lab_cor()
invisible(dev.off())
dir.create(file.path("ChillComa"), showWarnings = FALSE)
For a detailed description of tables, plots, linear models and outputs, please refer here
Mensh Lab : Florencia Putero, Lucas Kreiman, Julian Mensh
Vieira Lab : Jorge Vieira, Cristina P. Vieira, Pedro Duque, Tânia Dias
d_CCRT <- read.csv("MasterSheets_Oct21_git/CCRT_MasterSheet_Oct21.csv")
str(d_CCRT)
## 'data.frame': 2016 obs. of 15 variables:
## $ Supervisor.PI : chr "Vieira" "Vieira" "Vieira" "Vieira" ...
## $ Diet : chr "S" "S" "S" "S" ...
## $ Batch : int 4 4 4 4 4 4 4 4 4 4 ...
## $ Population : chr "AK" "AK" "AK" "AK" ...
## $ Line : chr "AK1" "AK1" "AK1" "AK1" ...
## $ Sex : chr "F" "F" "F" "F" ...
## $ ReplicateVialOld: int 1 1 1 1 1 1 1 1 1 1 ...
## $ ReplicateVial : chr "Vieira_4_AK1_F_1" "Vieira_4_AK1_F_1" "Vieira_4_AK1_F_1" "Vieira_4_AK1_F_1" ...
## $ Individual : int 1 2 3 4 5 6 1 2 3 4 ...
## $ CCRT_seconds : int 2381 1902 1847 1640 2202 1444 1550 1900 1505 1524 ...
## $ Censor : int 0 0 0 0 0 0 0 0 0 0 ...
## $ Country : chr "Finland" "Finland" "Finland" "Finland" ...
## $ Latitude : num 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 ...
## $ Longitude : num 23.5 23.5 23.5 23.5 23.5 ...
## $ Altitude : int 88 88 88 88 88 88 88 88 88 88 ...
d_CCRT$Supervisor.PI <- as.factor(d_CCRT$Supervisor.PI)
d_CCRT$Diet <- as.factor(d_CCRT$Diet)
d_CCRT$Batch <- as.factor(d_CCRT$Batch)
d_CCRT$Population_Lat <- factor(d_CCRT$Population, levels= c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))
d_CCRT$Population_Lon <- factor(d_CCRT$Population, levels= c("RE","GI","KA","MU","MA","AK","UM","YE","VA"))
d_CCRT$Population_Alt <- factor(d_CCRT$Population, levels= c("KA","AK","GI","RE","UM","VA","MU","MA","YE"))
d_CCRT$Line <- as.factor(d_CCRT$Line)
d_CCRT$Sex <- as.factor(d_CCRT$Sex)
d_CCRT$ReplicateVial <- as.factor(d_CCRT$ReplicateVial)
d_CCRT$CCRT_seconds <- as.numeric(d_CCRT$CCRT_seconds)
d_CCRT$Censor <- as.numeric(d_CCRT$Censor)
str(d_CCRT)
## 'data.frame': 2016 obs. of 18 variables:
## $ Supervisor.PI : Factor w/ 1 level "Vieira": 1 1 1 1 1 1 1 1 1 1 ...
## $ Diet : Factor w/ 1 level "S": 1 1 1 1 1 1 1 1 1 1 ...
## $ Batch : Factor w/ 27 levels "1","2","3","4",..: 4 4 4 4 4 4 4 4 4 4 ...
## $ Population : chr "AK" "AK" "AK" "AK" ...
## $ Line : Factor w/ 168 levels "AK1","AK10","AK11",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Sex : Factor w/ 2 levels "F","M": 1 1 1 1 1 1 2 2 2 2 ...
## $ ReplicateVialOld: int 1 1 1 1 1 1 1 1 1 1 ...
## $ ReplicateVial : Factor w/ 336 levels "Vieira_1_UM13_F_1",..: 235 235 235 235 235 235 236 236 236 236 ...
## $ Individual : int 1 2 3 4 5 6 1 2 3 4 ...
## $ CCRT_seconds : num 2381 1902 1847 1640 2202 ...
## $ Censor : num 0 0 0 0 0 0 0 0 0 0 ...
## $ Country : chr "Finland" "Finland" "Finland" "Finland" ...
## $ Latitude : num 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 ...
## $ Longitude : num 23.5 23.5 23.5 23.5 23.5 ...
## $ Altitude : int 88 88 88 88 88 88 88 88 88 88 ...
## $ Population_Lat : Factor w/ 9 levels "YE","RE","GI",..: 9 9 9 9 9 9 9 9 9 9 ...
## $ Population_Lon : Factor w/ 9 levels "RE","GI","KA",..: 6 6 6 6 6 6 6 6 6 6 ...
## $ Population_Alt : Factor w/ 9 levels "KA","AK","GI",..: 2 2 2 2 2 2 2 2 2 2 ...
d_CCRT_F <-subset(d_CCRT,Sex=='F')
d_CCRT_M <-subset(d_CCRT,Sex=='M')
Descriptive statistics at the line level, with batch information :
table_CCRT_Line_wbatch <- write.csv(d_CCRT %>% group_by(Supervisor.PI, Batch, Sex,Population, Line) %>%
summarise_at(vars(CCRT_seconds),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "ChillComa/table_CCRT_Line_wbatch.csv", row.names = T)
table_CCRT_Line_wbatch <- read.csv("ChillComa/table_CCRT_Line_wbatch.csv")
Descriptive statistics at the line level, without batch information :
table_CCRT_Line_wobatch <- write.csv(d_CCRT %>% group_by(Supervisor.PI, Sex,Population, Line) %>%
summarise_at(vars(CCRT_seconds),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "ChillComa/table_CCRT_Line_wobatch.csv", row.names = T)
table_CCRT_Line_wobatch <- read.csv("ChillComa/table_CCRT_Line_wobatch.csv")
Descriptive statistics at the population level, with batch information :
table_CCRT_pop_wbatch <- write.csv(d_CCRT %>% group_by(Supervisor.PI, Batch, Sex,Population) %>%
summarise_at(vars(CCRT_seconds),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "ChillComa/table_CCRT_pop_wbatch.csv", row.names = T)
table_CCRT_pop_wbatch <- read.csv("ChillComa/table_CCRT_pop_wbatch.csv")
Descriptive statistics at the population level, without batch information :
table_CCRT_pop_wobatch <- write.csv(d_CCRT %>% group_by(Supervisor.PI, Sex,Population) %>%
summarise_at(vars(CCRT_seconds),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "ChillComa/table_CCRT_pop_wobatch.csv", row.names = T)
table_CCRT_pop_wobatch <- read.csv("ChillComa/table_CCRT_pop_wobatch.csv")
min_CCRT <- min(d_CCRT$CCRT_seconds)
max_CCRT <- max(d_CCRT$CCRT_seconds)
y-axis is scaled by the minimum (0) and maximum (1) values in the full data set.
CCRT_F_lmer_Vieira <- lmer(CCRT_seconds ~ -1 + Population + (1|Population:Line) + (1|Batch) + (1|ReplicateVial:Line), data = filter(d_CCRT_F, Censor == "0" & Supervisor.PI == "Vieira"))
capture.output(summary(CCRT_F_lmer_Vieira),file = "ChillComa/CCRT_F_lmer_Vieira_sum.txt")
capture.output(anova(CCRT_F_lmer_Vieira),file = "ChillComa/CCRT_F_lmer_Vieira.txt")
capture.output(emmeans(CCRT_F_lmer_Vieira, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "ChillComa/CCRT_F_lmer_Vieira_tk.txt")
model_means_CCRT_F_Vieira <- emmeans(object = CCRT_F_lmer_Vieira, specs = ~ Population)
model_means_CCRT_F_Vieira_cld <- cld(object = model_means_CCRT_F_Vieira, adjust = "Tukey", Letters = letters, alpha = 0.05) %>% as.data.frame %>% mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))) %>% arrange(Population) %>% dplyr::rename(cld = .group)
## Note: adjust = "tukey" was changed to "sidak"
## because "tukey" is only appropriate for one set of pairwise comparisons
anova(CCRT_F_lmer_Vieira)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 767340659 85260073 9 32.479 465.02 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(CCRT_F_lmer_Vieira)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: CCRT_seconds ~ -1 + Population + (1 | Population:Line) + (1 |
## Batch) + (1 | ReplicateVial:Line)
## Data: filter(d_CCRT_F, Censor == "0" & Supervisor.PI == "Vieira")
##
## REML criterion at convergence: 14874.7
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.1461 -0.5789 -0.1437 0.3652 5.0319
##
## Random effects:
## Groups Name Variance Std.Dev.
## ReplicateVial:Line (Intercept) 799.8 28.28
## Population:Line (Intercept) 29469.4 171.67
## Batch (Intercept) 3852.3 62.07
## Residual 183347.9 428.19
## Number of obs: 993, groups:
## ReplicateVial:Line, 168; Population:Line, 168; Batch, 27
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 1582.02 62.96 38.07 25.13 < 2e-16 ***
## PopulationGI 1526.91 74.88 65.94 20.39 < 2e-16 ***
## PopulationKA 1388.14 62.08 42.64 22.36 < 2e-16 ***
## PopulationMA 1294.83 64.18 24.49 20.17 < 2e-16 ***
## PopulationMU 1532.41 66.30 17.90 23.11 8.89e-15 ***
## PopulationRE 1434.21 66.92 71.57 21.43 < 2e-16 ***
## PopulationUM 1714.00 64.27 37.74 26.67 < 2e-16 ***
## PopulationVA 1401.57 63.63 29.39 22.03 < 2e-16 ***
## PopulationYE 1482.00 61.88 37.25 23.95 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.150
## PopulatinKA 0.000 0.000
## PopulatinMA 0.000 0.000 0.018
## PopulatinMU 0.006 0.040 0.001 0.000
## PopulatinRE 0.075 0.037 0.002 0.000 0.002
## PopulatinUM 0.005 0.009 0.036 0.001 0.017 0.051
## PopulatinVA 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinYE 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.143
# might need to remove batch or data -- singularity is not coming from reps
CCRT_M_lmer_Vieira <- lmer(CCRT_seconds ~ -1 + Population + (1|Population:Line) + (1|Batch) + (1|ReplicateVial:Line), data = filter(d_CCRT_M, Censor == "0" & Supervisor.PI == "Vieira"))
## boundary (singular) fit: see ?isSingular
## Warning: Model failed to converge with 1 negative eigenvalue: -4.3e-05
capture.output(summary(CCRT_M_lmer_Vieira),file = "ChillComa/CCRT_M_lmer_Vieira_sum.txt")
capture.output(anova(CCRT_M_lmer_Vieira),file = "ChillComa/CCRT_M_lmer_Vieira.txt")
capture.output(emmeans(CCRT_M_lmer_Vieira, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "ChillComa/CCRT_M_lmer_Vieira_tk.txt")
model_means_CCRT_M_Vieira <- emmeans(object = CCRT_M_lmer_Vieira, specs = ~ Population)
model_means_CCRT_M_Vieira_cld <- cld(object = model_means_CCRT_M_Vieira, adjust = "Tukey", Letters = letters, alpha = 0.05) %>% as.data.frame %>% mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))) %>% arrange(Population) %>% dplyr::rename(cld = .group)
## Note: adjust = "tukey" was changed to "sidak"
## because "tukey" is only appropriate for one set of pairwise comparisons
anova(CCRT_M_lmer_Vieira)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 896220514 99580057 9 159.25 633.43 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(CCRT_M_lmer_Vieira)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: CCRT_seconds ~ -1 + Population + (1 | Population:Line) + (1 |
## Batch) + (1 | ReplicateVial:Line)
## Data: filter(d_CCRT_M, Censor == "0" & Supervisor.PI == "Vieira")
##
## REML criterion at convergence: 14768.2
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.3458 -0.5562 -0.1358 0.3737 4.4516
##
## Random effects:
## Groups Name Variance Std.Dev.
## ReplicateVial:Line (Intercept) 1.539e+03 3.923e+01
## Population:Line (Intercept) 4.448e+04 2.109e+02
## Batch (Intercept) 8.019e-05 8.955e-03
## Residual 1.572e+05 3.965e+02
## Number of obs: 993, groups:
## ReplicateVial:Line, 168; Population:Line, 168; Batch, 27
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 1563.51 60.09 157.52 26.02 <2e-16 ***
## PopulationGI 1844.86 74.54 157.52 24.75 <2e-16 ***
## PopulationKA 1445.65 60.50 161.63 23.89 <2e-16 ***
## PopulationMA 1329.62 60.19 158.53 22.09 <2e-16 ***
## PopulationMU 1694.41 60.09 157.52 28.20 <2e-16 ***
## PopulationRE 1563.65 67.33 158.78 23.22 <2e-16 ***
## PopulationUM 1578.36 61.87 159.65 25.51 <2e-16 ***
## PopulationVA 1505.40 60.30 159.54 24.97 <2e-16 ***
## PopulationYE 1653.14 60.61 162.70 27.28 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.000
## PopulatinKA 0.000 0.000
## PopulatinMA 0.000 0.000 0.000
## PopulatinMU 0.000 0.000 0.000 0.000
## PopulatinRE 0.000 0.000 0.000 0.000 0.000
## PopulatinUM 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinVA 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinYE 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## optimizer (nloptwrap) convergence code: 0 (OK)
## boundary (singular) fit: see ?isSingular
p_CCRT_F_Vieira <- ggplot(data = filter(d_CCRT_F, (Censor == "0") & (Supervisor.PI == "Vieira")), aes(x=Population_Lat, y=CCRT_seconds, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_CCRT_F_Vieira", x="Population", y = "CCRT_seconds") + ylim(c(min_CCRT, max_CCRT))+ droseu_theme
p_CCRT_F_Vieira
pdf(file="ChillComa/p_CCRT_F_Vieira.pdf",width=8, height=5)
p_CCRT_F_Vieira
dev.off()
## quartz_off_screen
## 2
p_CCRT_F_pop_Vieira <- ggplot(data = filter(d_CCRT_F, (Censor == "0") & (Supervisor.PI == "Vieira")), aes(x=Population_Lat, y=CCRT_seconds, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_CCRT_F_pop_Vieira", x="Population", y = "CCRT_seconds")+ ylim(c(min_CCRT, max_CCRT))+ geom_text(data = model_means_CCRT_F_Vieira_cld, aes(x = Population, label = cld), y = 1, vjust = 1) + droseu_theme
p_CCRT_F_pop_Vieira
pdf(file="ChillComa/p_CCRT_F_pop_Vieira.pdf",width=8, height=5)
p_CCRT_F_pop_Vieira
dev.off()
## quartz_off_screen
## 2
p_CCRT_M_Vieira <- ggplot(data = filter(d_CCRT_M, (Censor == "0") & (Supervisor.PI == "Vieira")), aes(x=Population_Lat, y=CCRT_seconds, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_CCRT_M", x="Population", y = "CCRT_seconds") + ylim(c(min_CCRT, max_CCRT))+ droseu_theme
p_CCRT_M_Vieira
pdf(file="ChillComa/p_CCRT_M_Vieira.pdf",width=8, height=5)
p_CCRT_M_Vieira
dev.off()
## quartz_off_screen
## 2
p_CCRT_M_pop_Vieira <- ggplot(data = filter(d_CCRT_M, (Censor == "0") & (Supervisor.PI == "Vieira")), aes(x=Population_Lat, y=CCRT_seconds, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_CCRT_M_pop_Vieira", x="Population", y = "CCRT_seconds") + ylim(c(min_CCRT, max_CCRT))+ geom_text(data = model_means_CCRT_M_Vieira_cld, aes(x = Population, label = cld), y = 1, vjust = 1) + droseu_theme
p_CCRT_M_pop_Vieira
pdf(file="ChillComa/p_CCRT_M_pop_Vieira.pdf",width=8, height=5)
p_CCRT_M_pop_Vieira
dev.off()
## quartz_off_screen
## 2
NA
dir.create(file.path("HeatShock"), showWarnings = FALSE)
For a detailed description of tables, plots, linear models and outputs, please refer here
Parsch Lab : Eliza Argyridou, Amanda Glaser-Schmitt, John Parsch
Vieira Lab : Jorge Vieira, Cristina P. Vieira, Pedro Duque, Tânia Dias
d_HSM <- read.csv("MasterSheets_Oct21_git/HSM_MasterSheet_Oct21.csv")
str(d_HSM)
## 'data.frame': 31244 obs. of 15 variables:
## $ Supervisor.PI : chr "Vieira" "Vieira" "Vieira" "Vieira" ...
## $ Diet : chr "S" "S" "S" "S" ...
## $ Batch : int 5 5 5 5 5 5 5 5 5 5 ...
## $ Population : chr "AK" "AK" "AK" "AK" ...
## $ Line : chr "AK1" "AK1" "AK1" "AK1" ...
## $ Sex : chr "F" "F" "F" "F" ...
## $ ReplicateVialOld: int 1 1 1 1 1 1 1 1 1 1 ...
## $ ReplicateVial : chr "Vieira_5_AK1_F_1" "Vieira_5_AK1_F_1" "Vieira_5_AK1_F_1" "Vieira_5_AK1_F_1" ...
## $ Individual : int 1 2 3 4 5 6 7 8 9 10 ...
## $ TimeDeath_min : int 240 240 300 300 300 330 360 360 360 390 ...
## $ Censor : int 0 0 0 0 0 0 0 0 0 0 ...
## $ Country : chr "Finland" "Finland" "Finland" "Finland" ...
## $ Latitude : num 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 ...
## $ Longitude : num 23.5 23.5 23.5 23.5 23.5 ...
## $ Altitude : int 88 88 88 88 88 88 88 88 88 88 ...
d_HSM$Supervisor.PI <- as.factor(d_HSM$Supervisor.PI)
d_HSM$Diet <- as.factor(d_HSM$Diet)
d_HSM$Batch <- as.factor(d_HSM$Batch)
d_HSM$Population_Lat <- factor(d_HSM$Population, levels= c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))
d_HSM$Population_Lon <- factor(d_HSM$Population, levels= c("RE","GI","KA","MU","MA","AK","UM","YE","VA"))
d_HSM$Population_Alt <- factor(d_HSM$Population, levels= c("KA","AK","GI","RE","UM","VA","MU","MA","YE"))
d_HSM$Line <- as.factor(d_HSM$Line)
d_HSM$Sex <- as.factor(d_HSM$Sex)
d_HSM$ReplicateVial <- as.factor(d_HSM$ReplicateVial)
d_HSM$TimeDeath_min <- as.numeric(d_HSM$TimeDeath_min)
d_HSM$Censor <- as.numeric(d_HSM$Censor)
str(d_HSM)
## 'data.frame': 31244 obs. of 18 variables:
## $ Supervisor.PI : Factor w/ 2 levels "Parsch","Vieira": 2 2 2 2 2 2 2 2 2 2 ...
## $ Diet : Factor w/ 2 levels "NS","S": 2 2 2 2 2 2 2 2 2 2 ...
## $ Batch : Factor w/ 32 levels "1","2","3","4",..: 5 5 5 5 5 5 5 5 5 5 ...
## $ Population : chr "AK" "AK" "AK" "AK" ...
## $ Line : Factor w/ 171 levels "AK1","AK10","AK11",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Sex : Factor w/ 2 levels "F","M": 1 1 1 1 1 1 1 1 1 1 ...
## $ ReplicateVialOld: int 1 1 1 1 1 1 1 1 1 1 ...
## $ ReplicateVial : Factor w/ 1816 levels "Parsch_1_AK1_F_1",..: 1691 1691 1691 1691 1691 1691 1691 1691 1691 1691 ...
## $ Individual : int 1 2 3 4 5 6 7 8 9 10 ...
## $ TimeDeath_min : num 240 240 300 300 300 330 360 360 360 390 ...
## $ Censor : num 0 0 0 0 0 0 0 0 0 0 ...
## $ Country : chr "Finland" "Finland" "Finland" "Finland" ...
## $ Latitude : num 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 ...
## $ Longitude : num 23.5 23.5 23.5 23.5 23.5 ...
## $ Altitude : int 88 88 88 88 88 88 88 88 88 88 ...
## $ Population_Lat : Factor w/ 9 levels "YE","RE","GI",..: 9 9 9 9 9 9 9 9 9 9 ...
## $ Population_Lon : Factor w/ 9 levels "RE","GI","KA",..: 6 6 6 6 6 6 6 6 6 6 ...
## $ Population_Alt : Factor w/ 9 levels "KA","AK","GI",..: 2 2 2 2 2 2 2 2 2 2 ...
d_HSM_F <-subset(d_HSM,Sex=='F')
d_HSM_M <-subset(d_HSM,Sex=='M')
Descriptive statistics at the line level, with batch information :
table_HSM_Line_wbatch <- write.csv(d_HSM %>% group_by(Supervisor.PI, Batch, Sex,Population, Line) %>%
summarise_at(vars(TimeDeath_min),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "HeatShock/table_HSM_Line_wbatch.csv", row.names = T)
table_HSM_Line_wbatch <- read.csv("HeatShock/table_HSM_Line_wbatch.csv")
Descriptive statistics at the line level, without batch information :
table_HSM_Line_wobatch <- write.csv(d_HSM %>% group_by(Supervisor.PI, Sex,Population, Line) %>%
summarise_at(vars(TimeDeath_min),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "HeatShock/table_HSM_Line_wobatch.csv", row.names = T)
table_HSM_Line_wobatch <- read.csv("HeatShock/table_HSM_Line_wobatch.csv")
Descriptive statistics at the population level, with batch information :
table_HSM_Pop_wbatch <- write.csv(d_HSM %>% group_by(Supervisor.PI, Batch, Sex, Population) %>%
summarise_at(vars(TimeDeath_min),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "HeatShock/table_HSM_Pop_wbatch.csv", row.names = T)
table_HSM_Pop_wbatch <- read.csv("HeatShock/table_HSM_Pop_wbatch.csv")
Descriptive statistics at the population level, without batch information :
table_HSM_Pop_wobatch <- write.csv(d_HSM %>% group_by(Supervisor.PI, Sex, Population) %>%
summarise_at(vars(TimeDeath_min),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "HeatShock/table_HSM_Pop_wobatch.csv", row.names = T)
table_HSM_Pop_wobatch <- read.csv("HeatShock/table_HSM_Pop_wobatch.csv")
min_HSM <- min(d_HSM$TimeDeath_min)
max_HSM <- max(d_HSM$TimeDeath_min)
y-axis is scaled by the minimum (30) and maximum (505) values in the full data set.
p_HSM_F <- ggplot(data = filter(d_HSM_F, (Censor == "0")), aes(x=Population_Lat, y=TimeDeath_min, fill=Supervisor.PI)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_HSM_F", x="Population", y = "TimeDeath(min)") + ylim(c(min_HSM, max_HSM))+ droseu_theme
p_HSM_F
pdf(file="HeatShock/p_HSM_F.pdf",width=8, height=5)
p_HSM_F
dev.off()
## quartz_off_screen
## 2
p_HSM_M <- ggplot(data = filter(d_HSM_M, (Censor == "0")), aes(x=Population_Lat, y=TimeDeath_min, fill=Supervisor.PI)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_HSM_M", x="Population", y = "TimeDeath(min)") + ylim(c(min_HSM, max_HSM))+ droseu_theme
p_HSM_M
pdf(file="HeatShock/p_HSM_M.pdf",width=8, height=5)
p_HSM_M
dev.off()
## quartz_off_screen
## 2
HSM_F_lmer_Parsch <- lmer(TimeDeath_min ~ -1 + Population + (1| Line : Population) + (1|Batch), data = filter(d_HSM_F, Censor == "0" & Supervisor.PI == "Parsch"))
capture.output(summary(HSM_F_lmer_Parsch),file = "HeatShock/HSM_F_lmer_sum_Parsch.txt")
capture.output(anova(HSM_F_lmer_Parsch),file = "HeatShock/HSM_F_lmer_Parsch.txt")
capture.output(emmeans(HSM_F_lmer_Parsch, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "HeatShock/HSM_F_lmer_Parsch_tk.txt")
anova(HSM_F_lmer_Parsch)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 2247426 249714 9 43.663 41.562 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(HSM_F_lmer_Parsch)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: TimeDeath_min ~ -1 + Population + (1 | Line:Population) + (1 |
## Batch)
## Data: filter(d_HSM_F, Censor == "0" & Supervisor.PI == "Parsch")
##
## REML criterion at convergence: 39308.5
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -4.9904 -0.5935 0.1317 0.6680 2.9181
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 2411 49.11
## Batch (Intercept) 3662 60.51
## Residual 6008 77.51
## Number of obs: 3384, groups: Line:Population, 133; Batch, 9
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 394.11 25.09 17.59 15.71 8.64e-12 ***
## PopulationGI 337.50 24.51 16.06 13.77 2.60e-10 ***
## PopulationKA 369.69 24.57 16.23 15.04 5.94e-11 ***
## PopulationMA 421.92 25.22 17.94 16.73 2.16e-12 ***
## PopulationMU 400.14 24.59 16.25 16.27 1.74e-11 ***
## PopulationRE 323.23 24.41 15.78 13.24 5.84e-10 ***
## PopulationUM 395.05 25.37 18.34 15.57 5.10e-12 ***
## PopulationVA 384.98 25.41 18.46 15.15 7.31e-12 ***
## PopulationYE 312.13 24.19 15.25 12.90 1.30e-09 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.673
## PopulatinKA 0.672 0.701
## PopulatinMA 0.659 0.658 0.663
## PopulatinMU 0.677 0.674 0.679 0.681
## PopulatinRE 0.651 0.666 0.666 0.650 0.666
## PopulatinUM 0.618 0.637 0.634 0.615 0.630 0.689
## PopulatinVA 0.617 0.636 0.633 0.615 0.630 0.687 0.676
## PopulatinYE 0.661 0.680 0.676 0.657 0.674 0.699 0.678 0.677
HSM_M_lmer_Parsch <- lmer(TimeDeath_min ~ -1 + Population + (1| Line : Population) + (1|Batch), data = filter(d_HSM_M, Censor == "0" & Supervisor.PI == "Parsch"))
capture.output(summary(HSM_M_lmer_Parsch),file = "HeatShock/HSM_M_lmer_sum_Parsch.txt")
capture.output(anova(HSM_M_lmer_Parsch),file = "HeatShock/HSM_M_lmer_Parsch.txt")
capture.output(emmeans(HSM_M_lmer_Parsch, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "HeatShock/HSM_M_lmer_Parsch_tk.txt")
anova(HSM_M_lmer_Parsch)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 1663186 184798 9 46.556 38.121 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(HSM_M_lmer_Parsch)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: TimeDeath_min ~ -1 + Population + (1 | Line:Population) + (1 |
## Batch)
## Data: filter(d_HSM_M, Censor == "0" & Supervisor.PI == "Parsch")
##
## REML criterion at convergence: 57794.9
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -5.2106 -0.6839 0.0461 0.6733 2.8035
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 4376 66.15
## Batch (Intercept) 3268 57.17
## Residual 4848 69.63
## Number of obs: 5065, groups: Line:Population, 135; Batch, 9
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 382.38 26.00 25.15 14.71 7.34e-14 ***
## PopulationGI 285.06 26.00 25.18 10.96 4.46e-11 ***
## PopulationKA 339.67 25.95 24.97 13.09 1.11e-12 ***
## PopulationMA 387.41 26.00 25.18 14.90 5.37e-14 ***
## PopulationMU 352.29 25.95 24.96 13.58 4.99e-13 ***
## PopulationRE 263.14 25.95 24.95 10.14 2.47e-10 ***
## PopulationUM 369.25 26.25 26.07 14.07 1.09e-13 ***
## PopulationVA 353.08 26.24 26.05 13.45 3.10e-13 ***
## PopulationYE 257.98 25.79 24.40 10.00 4.13e-10 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.543
## PopulatinKA 0.546 0.552
## PopulatinMA 0.549 0.539 0.545
## PopulatinMU 0.550 0.540 0.546 0.553
## PopulatinRE 0.529 0.530 0.531 0.530 0.531
## PopulatinUM 0.517 0.521 0.520 0.517 0.518 0.556
## PopulatinVA 0.517 0.521 0.521 0.517 0.518 0.556 0.560
## PopulatinYE 0.535 0.538 0.538 0.534 0.536 0.549 0.547 0.547
p_HSM_F_Parsch <- ggplot(data = filter(d_HSM_F, (Censor == "0") & (Supervisor.PI == "Parsch")), aes(x=Population_Lat, y=TimeDeath_min, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_HSM_F_Parsch", x="Population", y = "TimeDeath_min") + ylim(c(min_HSM, max_HSM))+ droseu_theme
p_HSM_F_Parsch
pdf(file="HeatShock/p_HSM_F_Parsch.pdf",width=8, height=5)
p_HSM_F_Parsch
dev.off()
## quartz_off_screen
## 2
p_HSM_F_pop_Parsch <- ggplot(data = filter(d_HSM_F, (Censor == "0") & (Supervisor.PI == "Parsch")), aes(x=Population_Lat, y=TimeDeath_min, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_HSM_F_pop_Parsch", x="Population", y = "TimeDeath_min") + ylim(c(min_HSM, max_HSM))+ droseu_theme
p_HSM_F_pop_Parsch
pdf(file="HeatShock/p_HSM_F_pop_Parsch.pdf",width=8, height=5)
p_HSM_F_pop_Parsch
dev.off()
## quartz_off_screen
## 2
p_HSM_M_Parsch <- ggplot(data = filter(d_HSM_M, (Censor == "0") & (Supervisor.PI == "Parsch")), aes(x=Population_Lat, y=TimeDeath_min, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_HSM_M_Parsch", x="Population", y = "TimeDeath_min") + ylim(c(min_HSM, max_HSM))+ droseu_theme
p_HSM_M_Parsch
pdf(file="HeatShock/p_HSM_M_Parsch.pdf",width=8, height=5)
p_HSM_M_Parsch
dev.off()
## quartz_off_screen
## 2
p_HSM_M_pop_Parsch <- ggplot(data = filter(d_HSM_M, (Censor == "0") & (Supervisor.PI == "Parsch")), aes(x=Population_Lat, y=TimeDeath_min, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_HSM_M_pop_Parsch", x="Population", y = "TimeDeath_min") + ylim(c(min_HSM, max_HSM))+ droseu_theme
p_HSM_M_pop_Parsch
pdf(file="HeatShock/p_HSM_M_pop_Parsch.pdf",width=8, height=5)
p_HSM_M_pop_Parsch
dev.off()
## quartz_off_screen
## 2
HSM_F_lmer_Vieira <- lmer(TimeDeath_min ~ -1 + Population + (1|Line:Population) + (1|Batch), data = filter(d_HSM_F, Censor == "0" & Supervisor.PI == "Vieira"))
capture.output(summary(HSM_F_lmer_Vieira), file = "HeatShock/HSM_F_lmer_sum_Vieira.txt")
capture.output(anova(HSM_F_lmer_Vieira), file = "HeatShock/HSM_F_lmer_Vieira.txt")
capture.output(emmeans(HSM_F_lmer_Vieira, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "HeatShock/HSM_F_lmer_Vieira_tk.txt")
anova(HSM_F_lmer_Vieira)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 97061341 10784593 9 45.874 3538.6 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(HSM_F_lmer_Vieira)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: TimeDeath_min ~ -1 + Population + (1 | Line:Population) + (1 |
## Batch)
## Data: filter(d_HSM_F, Censor == "0" & Supervisor.PI == "Vieira")
##
## REML criterion at convergence: 57881.5
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -6.2647 -0.5129 0.1397 0.7262 2.3668
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 433.75 20.827
## Batch (Intercept) 17.84 4.223
## Residual 3047.69 55.206
## Number of obs: 5310, groups: Line:Population, 168; Batch, 32
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 362.739 5.729 72.734 63.32 <2e-16 ***
## PopulationGI 333.996 6.530 76.988 51.15 <2e-16 ***
## PopulationKA 363.872 6.033 71.727 60.31 <2e-16 ***
## PopulationMA 372.451 5.802 41.351 64.20 <2e-16 ***
## PopulationMU 331.900 5.408 33.797 61.37 <2e-16 ***
## PopulationRE 377.147 6.574 37.291 57.37 <2e-16 ***
## PopulationUM 364.563 5.828 65.949 62.55 <2e-16 ***
## PopulationVA 357.419 5.517 29.304 64.78 <2e-16 ***
## PopulationYE 362.175 5.687 34.993 63.68 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.024
## PopulatinKA 0.000 0.000
## PopulatinMA 0.000 0.000 0.005
## PopulatinMU 0.051 0.026 0.001 0.000
## PopulatinRE 0.000 0.000 0.007 0.000 0.000
## PopulatinUM 0.008 0.010 0.029 0.000 0.022 0.000
## PopulatinVA 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinYE 0.000 0.000 0.000 0.007 0.000 0.000 0.000 0.059
HSM_M_lmer_Vieira <- lmer(TimeDeath_min ~ -1 + Population + (1|Line:Population) + (1|Batch), data = filter(d_HSM_M, Censor == "0" & Supervisor.PI == "Vieira"))
capture.output(summary(HSM_M_lmer_Vieira), file = "HeatShock/HSM_M_lmer_sum_Vieira.txt")
capture.output(anova(HSM_M_lmer_Vieira), file = "HeatShock/HSM_M_lmer_Vieira.txt")
capture.output(emmeans(HSM_M_lmer_Vieira, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "HeatShock/HSM_M_lmer_Vieira_tk.txt")
anova(HSM_M_lmer_Vieira)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 20209997 2245555 9 45.945 753.8 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(HSM_M_lmer_Vieira)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: TimeDeath_min ~ -1 + Population + (1 | Line:Population) + (1 |
## Batch)
## Data: filter(d_HSM_M, Censor == "0" & Supervisor.PI == "Vieira")
##
## REML criterion at convergence: 95195.7
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -5.8393 -0.6019 0.0454 0.6858 2.7930
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 1002.0 31.65
## Batch (Intercept) 260.4 16.14
## Residual 2979.0 54.58
## Number of obs: 8743, groups: Line:Population, 168; Batch, 32
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 343.597 9.407 61.170 36.53 <2e-16 ***
## PopulationGI 277.186 11.169 75.928 24.82 <2e-16 ***
## PopulationKA 326.787 9.789 52.506 33.38 <2e-16 ***
## PopulationMA 319.605 10.244 37.018 31.20 <2e-16 ***
## PopulationMU 306.202 9.869 58.545 31.03 <2e-16 ***
## PopulationRE 327.221 11.897 30.542 27.50 <2e-16 ***
## PopulationUM 314.506 9.646 64.385 32.61 <2e-16 ***
## PopulationVA 320.016 10.434 36.538 30.67 <2e-16 ***
## PopulationYE 324.995 10.458 38.620 31.08 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.147
## PopulatinKA 0.008 0.008
## PopulatinMA 0.000 0.000 0.035
## PopulatinMU 0.232 0.133 0.015 0.001
## PopulatinRE 0.000 0.000 0.048 0.002 0.001
## PopulatinUM 0.071 0.066 0.117 0.004 0.131 0.006
## PopulatinVA 0.000 0.000 0.000 0.012 0.000 0.000 0.000
## PopulatinYE 0.000 0.000 0.002 0.045 0.000 0.000 0.000 0.260
p_HSM_F_Vieira <- ggplot(data = filter(d_HSM_F, (Censor == "0") & (Supervisor.PI == "Vieira")), aes(x=Population_Lat, y=TimeDeath_min, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_HSM_F_Vieira", x="Population", y = "TimeDeath_min") + ylim(c(min_HSM, max_HSM))+ droseu_theme
p_HSM_F_Vieira
pdf(file="HeatShock/p_HSM_F_Vieira.pdf",width=8, height=5)
p_HSM_F_Vieira
dev.off()
## quartz_off_screen
## 2
p_HSM_F_pop_Vieira <- ggplot(data = filter(d_HSM_F, (Censor == "0") & (Supervisor.PI == "Vieira")), aes(x=Population_Lat, y=TimeDeath_min, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_HSM_F_pop_Vieira", x="Population", y = "TimeDeath_min") + ylim(c(min_HSM, max_HSM))+ droseu_theme
p_HSM_F_pop_Vieira
pdf(file="HeatShock/p_HSM_F_pop_Vieira.pdf",width=8, height=5)
p_HSM_F_pop_Vieira
dev.off()
## quartz_off_screen
## 2
p_HSM_M_Vieira <- ggplot(data = filter(d_HSM_M, (Censor == "0") & (Supervisor.PI == "Vieira")), aes(x=Population_Lat, y=TimeDeath_min, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_HSM_M_Vieira", x="Population", y = "TimeDeath_min") + ylim(c(min_HSM, max_HSM))+ droseu_theme
p_HSM_M_Vieira
pdf(file="HeatShock/p_HSM_M_Vieira.pdf",width=8, height=5)
p_HSM_M_Vieira
dev.off()
## quartz_off_screen
## 2
p_HSM_M_pop_Vieira <- ggplot(data = filter(d_HSM_M, (Censor == "0") & (Supervisor.PI == "Vieira")), aes(x=Population_Lat, y=TimeDeath_min, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_HSM_M_pop_Vieira", x="Population", y = "TimeDeath_min") + ylim(c(min_HSM, max_HSM))+ droseu_theme
p_HSM_M_pop_Vieira
pdf(file="HeatShock/p_HSM_M_pop_Vieira.pdf",width=8, height=5)
p_HSM_M_pop_Vieira
dev.off()
## quartz_off_screen
## 2
intersect_Line_HSM <- Reduce(intersect, list(d_HSM$Line[d_HSM$Supervisor.PI == "Parsch"],
d_HSM$Line[d_HSM$Supervisor.PI == "Vieira"]))
write(intersect_Line_HSM, file ="HeatShock/intersect_Line_HSM.txt", sep = "\t")
intersect_Pop_HSM <- Reduce(intersect, list(d_HSM$Population[d_HSM$Supervisor.PI == "Parsch"],
d_HSM$Population[d_HSM$Supervisor.PI == "Vieira"]))
write(intersect_Pop_HSM, file ="HeatShock/intersect_Pop_HSM.txt", sep = "\t")
There are 9 populations and 132 isofemale lines that have been phenotyped across the labs. Please refer to tables named intersect_Trait_level (i.e. intersect_Via_pop) for details.
HSM_fitted <- combineFitted(labs = rep(c("Parsch", "Vieira"), 2), sex = rep(c("F", "M"), each = 2), models = list(HSM_F_lmer_Parsch, HSM_F_lmer_Vieira, HSM_M_lmer_Parsch, HSM_M_lmer_Vieira))
p_HSM_F_lab_cor <- function() scatterPlotMatrix(HSM_fitted, sex = "F")
p_HSM_M_lab_cor <- function() scatterPlotMatrix(HSM_fitted, sex = "M")
p_HSM_F_lab_cor()
pdf(file="HeatShock/p_HSM_F_lab_cor.pdf",width=8, height=8)
p_HSM_F_lab_cor()
invisible(dev.off())
p_HSM_M_lab_cor()
pdf(file="HeatShock/p_HSM_M_lab_cor.pdf",width=8, height=8)
p_HSM_M_lab_cor()
invisible(dev.off())
dir.create(file.path("Diapause"), showWarnings = FALSE)
For a detailed description of tables, plots, linear models and outputs, please refer here
Bergland Lab : Liam Miller, Alan Bergland, Priscilla Erickson
Flatt Lab : Esra Durmaz, Envel Kerdaffrec, Thibault Schowing, Virginie Thieu, Marisa Rodrigues, Thomas Flatt
Schlotterer Lab : Manolis Lyrakis, Christian Schlötterer
d_Dia <- read.csv("MasterSheets_Oct21_git/DIA_MasterSheet_Oct21.csv")
str(d_Dia)
## 'data.frame': 8206 obs. of 12 variables:
## $ Supervisor.PI : chr "Bergland" "Bergland" "Bergland" "Bergland" ...
## $ Diet : chr "S" "S" "S" "S" ...
## $ Batch : int 3 3 3 3 3 3 3 3 3 3 ...
## $ Population : chr "AK" "AK" "AK" "AK" ...
## $ Line : chr "AK1" "AK1" "AK1" "AK1" ...
## $ Individual : int 1 2 3 4 5 6 7 8 9 10 ...
## $ MostAdvancedStage: int 9 7 10 8 8 8 8 9 9 8 ...
## $ NumberOfEggs : int 1 0 3 0 1 3 0 4 3 1 ...
## $ Country : chr "Finland" "Finland" "Finland" "Finland" ...
## $ Latitude : num 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 ...
## $ Longitude : num 23.5 23.5 23.5 23.5 23.5 ...
## $ Altitude : int 88 88 88 88 88 88 88 88 88 88 ...
d_Dia <- d_Dia %>%
mutate(Supervisor.PI = as.factor(Supervisor.PI),
Diet = as.factor(Diet),
Batch = as.factor(Batch),
Population = as.factor(Population),
Line = as.factor(Line),
MostAdvancedStage = as.numeric(MostAdvancedStage),
NumberOfEggs = as.numeric(NumberOfEggs),
Max_Stage7 = ifelse(MostAdvancedStage <= 7 & NumberOfEggs == 0, 1, 0),
Max_Stage8 = ifelse(MostAdvancedStage <= 8 & NumberOfEggs == 0, 1, 0),
Max_Stage9 = ifelse(MostAdvancedStage <= 9 & NumberOfEggs == 0, 1, 0),
Population_Lat = factor(Population, levels= c("YE","RE","GI","MU","MA","UM","KA","VA","AK")),
Population_Lon = factor(Population, levels= c("RE","GI","KA","MU","MA","AK","UM","YE","VA")),
Population_Alt = factor(Population, levels= c("KA","AK","GI","RE","UM","VA","MU","MA","YE")))
str(d_Dia)
## 'data.frame': 8206 obs. of 18 variables:
## $ Supervisor.PI : Factor w/ 3 levels "Bergland","Flatt",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Diet : Factor w/ 2 levels "NS","S": 2 2 2 2 2 2 2 2 2 2 ...
## $ Batch : Factor w/ 3 levels "1","2","3": 3 3 3 3 3 3 3 3 3 3 ...
## $ Population : Factor w/ 9 levels "AK","GI","KA",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Line : Factor w/ 168 levels "AK1","AK10","AK11",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Individual : int 1 2 3 4 5 6 7 8 9 10 ...
## $ MostAdvancedStage: num 9 7 10 8 8 8 8 9 9 8 ...
## $ NumberOfEggs : num 1 0 3 0 1 3 0 4 3 1 ...
## $ Country : chr "Finland" "Finland" "Finland" "Finland" ...
## $ Latitude : num 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 ...
## $ Longitude : num 23.5 23.5 23.5 23.5 23.5 ...
## $ Altitude : int 88 88 88 88 88 88 88 88 88 88 ...
## $ Max_Stage7 : num 0 1 0 0 0 0 0 0 0 0 ...
## $ Max_Stage8 : num 0 1 0 1 0 0 1 0 0 0 ...
## $ Max_Stage9 : num 0 1 0 1 0 0 1 0 0 0 ...
## $ Population_Lat : Factor w/ 9 levels "YE","RE","GI",..: 9 9 9 9 9 9 9 9 9 9 ...
## $ Population_Lon : Factor w/ 9 levels "RE","GI","KA",..: 6 6 6 6 6 6 6 6 6 6 ...
## $ Population_Alt : Factor w/ 9 levels "KA","AK","GI",..: 2 2 2 2 2 2 2 2 2 2 ...
##### calculate diapause proportions per line, with and without batch
d_Dia_Line_wbatch <- d_Dia %>%
group_by(Supervisor.PI, Batch, Population, Population_Lat, Population_Lon, Population_Alt, Line) %>%
dplyr::summarise(n_ind = as.numeric(n()),
Max_Stage7_Prop = mean(Max_Stage7, na.rm = T),
Max_Stage8_Prop = mean(Max_Stage8, na.rm = T),
Max_Stage9_Prop = mean(Max_Stage9, na.rm = T),
Max_Stage7_Prop_Asin = asin(sqrt(mean(Max_Stage7, na.rm = T))),
Max_Stage8_Prop_Asin = asin(sqrt(mean(Max_Stage8, na.rm = T))),
Max_Stage9_Prop_Asin = asin(sqrt(mean(Max_Stage9, na.rm = T))),
.groups = "drop")
d_Dia_Line_wobatch <- d_Dia %>%
group_by(Supervisor.PI, Population, Population_Lat, Population_Lon, Population_Alt, Line) %>%
dplyr::summarise(n_ind = as.numeric(n()),
Max_Stage7_Prop = mean(Max_Stage7, na.rm = T),
Max_Stage8_Prop = mean(Max_Stage8, na.rm = T),
Max_Stage9_Prop = mean(Max_Stage9, na.rm = T),
Max_Stage7_Prop_Asin = asin(sqrt(mean(Max_Stage7, na.rm = T))),
Max_Stage8_Prop_Asin = asin(sqrt(mean(Max_Stage8, na.rm = T))),
Max_Stage9_Prop_Asin = asin(sqrt(mean(Max_Stage9, na.rm = T))),
.groups = "drop")
Descriptive statistics at the line level for Max Stage 9, with batch information :
table_Dia_Line_wbatch <- d_Dia_Line_wbatch %>% group_by(Supervisor.PI, Batch, Population, Line) %>% summarise_at(vars(Max_Stage9_Prop), list(Mean = mean, SD = sd, Median = median, Min = min, Max = max, SE = std_err, CV = coef_var, Mode = estimate_mode))
write.csv(table_Dia_Line_wbatch, "Diapause/table_Dia_Line_wbatch.csv", row.names = T)
Descriptive statistics at the line level for Max Stage 9, without batch information :
table_Dia_Line_wobatch <- d_Dia_Line_wobatch %>% group_by(Supervisor.PI, Population, Line) %>% summarise_at(vars(Max_Stage9_Prop), list(Mean = mean, SD= sd, Median = median, Min = min, Max = max, SE = std_err, CV = coef_var, Mode = estimate_mode))
write.csv(table_Dia_Line_wobatch, "Diapause/table_Dia_Line_wobatch.csv", row.names = T)
Descriptive statistics at the population level, with batch information :
table_Dia_Pop_wbatch <- d_Dia_Line_wbatch %>% group_by(Supervisor.PI, Batch, Population) %>% summarise_at(vars(Max_Stage9_Prop), list(Mean = mean, SD= sd, Median = median, Min = min, Max = max, SE = std_err, CV = coef_var, Mode = estimate_mode))
write.csv(table_Dia_Pop_wbatch, "Diapause/table_Dia_Pop_wbatch.csv", row.names = T)
Descriptive statistics at the population level, without batch information :
table_Dia_Pop_wobatch <- d_Dia_Line_wobatch %>% group_by(Supervisor.PI, Population) %>% summarise_at(vars(Max_Stage9_Prop), list(Mean = mean, SD= sd, Median = median, Min = min, Max = max, SE = std_err, CV = coef_var, Mode = estimate_mode))
write.csv(table_Dia_Pop_wobatch, "Diapause/table_Dia_Line_wobatch.csv", row.names = T)
Dia_lmer_Bergland <- lmer(Max_Stage9_Prop ~ -1 + Population + (1|Population:Line) + (1|Batch) , data = d_Dia_Line_wbatch %>% filter(Supervisor.PI == "Bergland"))
capture.output(summary(Dia_lmer_Bergland),file = "Diapause/Dia_lmer_Bergland_sum.txt")
capture.output(anova(Dia_lmer_Bergland),file = "Diapause/Dia_lmer_Bergland.txt")
capture.output(emmeans(Dia_lmer_Bergland, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "Diapause/Dia_lmer_Bergland_tk.txt")
model_means_Bergland <- emmeans(object = Dia_lmer_Bergland, specs = ~ Population)
model_means_Bergland_cld <- cld(object = model_means_Bergland, adjust = "Tukey", Letters = letters, alpha = 0.05) %>% as.data.frame %>% mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))) %>% arrange(Population) %>% dplyr::rename(cld = .group)
## Note: adjust = "tukey" was changed to "sidak"
## because "tukey" is only appropriate for one set of pairwise comparisons
min_Dia <- min(d_Dia_Line_wbatch$Max_Stage9_Prop)
max_Dia <- max(d_Dia_Line_wbatch$Max_Stage9_Prop)
p_Dia_Pop_Bergland_wbatch <- d_Dia_Line_wbatch %>%
filter(Supervisor.PI == 'Bergland') %>%
ggplot(aes(x = Population_Lat, y = Max_Stage9_Prop, fill = Batch)) +
geom_boxplot(outlier.shape = NA, notch = FALSE) +
labs(title = "p_Dia_Bergland", x = "Population", y = "Max_Stage9_Prop") +
droseu_theme +
ylim(c(min_Dia, max_Dia))
p_Dia_Pop_Bergland_wbatch
pdf(file="Diapause/p_Dia_Pop_Bergland_wbatch.pdf",width=8, height=5)
p_Dia_Pop_Bergland_wbatch
dev.off()
## quartz_off_screen
## 2
p_Dia_Pop_Bergland_wobatch <- d_Dia_Line_wobatch %>%
filter(Supervisor.PI == 'Bergland') %>%
inner_join(model_means_Bergland_cld) %>%
ggplot(aes(x = Population_Lat, y = Max_Stage9_Prop, fill = Population)) +
geom_boxplot(outlier.shape = NA, notch = FALSE) +
geom_text(data = model_means_Bergland_cld, aes(x = Population, label = cld), y = 1, vjust = -1) +
labs(title = "p_Dia_Bergland", x = "Population", y = "Max_Stage9_Prop") +
droseu_theme +
ylim(c(min_Dia, max_Dia))
## Joining, by = "Population"
p_Dia_Pop_Bergland_wobatch
pdf(file="Diapause/p_Dia_Pop_Bergland_wobatch.pdf",width=8, height=5)
p_Dia_Pop_Bergland_wobatch
dev.off()
## quartz_off_screen
## 2
Dia_lm_Flatt <- lm(Max_Stage9_Prop ~ -1 + Population, data = d_Dia_Line_wbatch %>% filter(Supervisor.PI == "Flatt"))
capture.output(summary(Dia_lm_Flatt),file = "Diapause/Dia_lm_Flatt_sum.txt")
capture.output(anova(Dia_lm_Flatt),file = "Diapause/Dia_lm_Flatt")
capture.output(emmeans(Dia_lm_Flatt, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "Diapause/Dia_lm_Flatt_tk.txt")
model_means_Flatt <- emmeans(object = Dia_lm_Flatt, specs = ~ Population)
model_means_Flatt_cld <- cld(object = model_means_Flatt, adjust = "Tukey", Letters = letters, alpha = 0.05) %>% as.data.frame %>% mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))) %>% arrange(Population) %>% dplyr::rename(cld = .group)
## Note: adjust = "tukey" was changed to "sidak"
## because "tukey" is only appropriate for one set of pairwise comparisons
p_Dia_Pop_Flatt_wbatch <- d_Dia_Line_wbatch %>%
filter(Supervisor.PI == 'Flatt') %>%
ggplot(aes(x = Population_Lat, y = Max_Stage9_Prop, fill = Batch)) +
geom_boxplot(outlier.shape = NA, notch = FALSE) +
labs(title = "p_Dia_Flatt", x = "Population", y = "Max_Stage9_Prop") +
droseu_theme +
ylim(c(min_Dia, max_Dia))
p_Dia_Pop_Flatt_wbatch
pdf(file="Diapause/p_Dia_Pop_Flatt_wbatch.pdf", width=8, height=5)
p_Dia_Pop_Flatt_wbatch
dev.off()
## quartz_off_screen
## 2
p_Dia_Pop_Flatt_wobatch <- d_Dia_Line_wobatch %>%
filter(Supervisor.PI == 'Flatt') %>%
ggplot(aes(x = Population_Lat, y = Max_Stage9_Prop, fill = Population)) +
geom_boxplot(outlier.shape = NA, notch = FALSE) +
geom_text(data = model_means_Flatt_cld, aes(x = Population, label = cld), y = 1, vjust = -1) +
labs(title = "p_Dia_Flatt", x = "Population", y = "Max_Stage9_Prop") +
droseu_theme +
ylim(c(min_Dia, max_Dia))
p_Dia_Pop_Flatt_wobatch
pdf(file="Diapause/p_Dia_Pop_Flatt_wobatch.pdf", width=8, height=5)
p_Dia_Pop_Flatt_wobatch
dev.off()
## quartz_off_screen
## 2
Dia_lmer_Schlotterer <- lmer(Max_Stage9_Prop ~ -1 + Population + (1|Population:Line) + (1|Batch) , data = d_Dia_Line_wbatch %>% filter(Supervisor.PI == "Schlotterer"))
capture.output(summary(Dia_lmer_Schlotterer),file = "Diapause/Dia_lmer_Schlotterer_sum.txt")
capture.output(anova(Dia_lmer_Schlotterer),file = "Diapause/Dia_lmer_Schlotterer.txt")
capture.output(emmeans(Dia_lmer_Schlotterer, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "Diapause/Dia_lmer_Schlotterer_tk.txt")
model_means_Schlotterer <- emmeans(object = Dia_lmer_Schlotterer, specs = ~ Population)
model_means_Schlotterer_cld <- cld(object = model_means_Schlotterer, adjust = "Tukey", Letters = letters, alpha = 0.05) %>% as.data.frame %>% mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))) %>% arrange(Population) %>% dplyr::rename(cld = .group)
## Note: adjust = "tukey" was changed to "sidak"
## because "tukey" is only appropriate for one set of pairwise comparisons
p_Dia_Pop_Schlotterer_wbatch <- d_Dia_Line_wbatch %>%
filter(Supervisor.PI == 'Schlotterer') %>%
ggplot(aes(x = Population_Lat, y = Max_Stage9_Prop, fill = Batch)) +
geom_boxplot(outlier.shape = NA, notch = FALSE) +
labs(title = "p_Dia_Schlotterer", x = "Population", y = "Max_Stage9_Prop") +
droseu_theme +
ylim(c(min_Dia, max_Dia))
p_Dia_Pop_Schlotterer_wbatch
pdf(file="Diapause/p_Dia_Pop_Schlotterer_wbatch.pdf", width=8, height=5)
p_Dia_Pop_Schlotterer_wbatch
dev.off()
## quartz_off_screen
## 2
p_Dia_Pop_Schlotterer_wobatch <- d_Dia_Line_wobatch %>%
filter(Supervisor.PI == 'Schlotterer') %>%
ggplot(aes(x = Population_Lat, y = Max_Stage9_Prop, fill = Population)) +
geom_boxplot(outlier.shape = NA, notch = FALSE) +
geom_text(data = model_means_Schlotterer_cld, aes(x = Population, label = cld), y = 1, vjust = -0.7) +
labs(title = "p_Dia_Schlotterer", x = "Population", y = "Max_Stage9_Prop") +
droseu_theme +
ylim(c(min_Dia, max_Dia))
p_Dia_Pop_Schlotterer_wobatch
pdf(file="Diapause/p_Dia_Pop_Schlotterer_wobatch.pdf", width=8, height=5)
p_Dia_Pop_Schlotterer_wobatch
dev.off()
## quartz_off_screen
## 2
intersect_Line_Dia <- Reduce(intersect, list(d_Dia$Line[d_Dia$Supervisor.PI == "Flatt"],
d_Dia$Line[d_Dia$Supervisor.PI == "Bergland"],
d_Dia$Line[d_Dia$Supervisor.PI == "Schlotterer"]))
write(intersect_Line_Dia, file ="Diapause/intersect_Line_Dia.txt", sep = "\t")
intersect_Pop_Dia <- Reduce(intersect, list(d_Dia$Population[d_Dia$Supervisor.PI == "Flatt"],
d_Dia$Population[d_Dia$Supervisor.PI == "Bergland"],
d_Dia$Population[d_Dia$Supervisor.PI == "Schlotterer"]))
write(intersect_Pop_Dia, file ="Diapause/intersect_Pop_Dia.txt", sep = "\t")
There are 9 populations and 146 isofemale lines that have been phenotyped across the labs. Please refer to tables named intersect_Trait_level (i.e. intersect_Via_pop) for details.
Dia_fitted <- combineFitted(labs = c("Bergland", "Flatt", "Schlotterer"), sex = rep("F", 3), models = list(Dia_lmer_Bergland, Dia_lm_Flatt, Dia_lmer_Schlotterer))
p_Dia_F_lab_cor <- function() scatterPlotMatrix(Dia_fitted, sex = "F")
p_Dia_F_lab_cor()
pdf(file="Diapause/p_Dia_F_lab_cor.pdf",width=8, height=8)
p_Dia_F_lab_cor()
invisible(dev.off())
dir.create(file.path("CircadianEclosion"), showWarnings = FALSE)
For a detailed description of tables, plots, linear models and outputs, please refer here
#Note that the trait has been phenotyped as mixed sex.
Wegener Lab : Susanne Klühspies, Christian Wegener
d_CET <- read.csv("MasterSheets_Oct21_git/CET_MasterSheet_Dec21.csv")
str(d_CET)
## 'data.frame': 36 obs. of 16 variables:
## $ Supervisor.PI : chr "Wegener" "Wegener" "Wegener" "Wegener" ...
## $ Diet : chr "NS" "NS" "NS" "NS" ...
## $ total...of.flies : int 1897 793 1938 1355 2349 1418 1178 1544 2150 1236 ...
## $ Batch : int 2 2 2 2 3 2 1 2 3 2 ...
## $ Population : chr "AK" "GI" "KA" "MA" ...
## $ Line : chr "mixed population" "mixed population" "mixed population" "mixed population" ...
## $ Sex : chr "mixed sex" "mixed sex" "mixed sex" "mixed sex" ...
## $ ReplicateVial : logi NA NA NA NA NA NA ...
## $ Individual : logi NA NA NA NA NA NA ...
## $ Condition : chr "18_LD_DD" "18_LD_DD" "18_LD_DD" "18_LD_DD" ...
## $ CET_hours_MESA : num 13.2 10.5 14 16.8 10.5 ...
## $ CET_hours_LSPR : num 12.5 10.5 11.7 17.5 11 ...
## $ Period_MESA : num 24.2 24.8 24.1 23.3 24.9 ...
## $ Period_LSPR : num 24.4 24.8 24.8 23.1 24.7 ...
## $ Rhythmicity_LSPR_amplitude : num 11.66 6.55 9.75 7.47 16.88 ...
## $ Rhythmicity_JTK_p_BH_corrected: num 5.26e-24 6.27e-22 6.76e-14 2.92e-09 4.21e-24 ...
d_CET$Supervisor.PI <- as.factor(d_CET$Supervisor.PI)
d_CET$Diet <- as.factor(d_CET$Diet)
d_CET$Batch <- as.factor(d_CET$Batch)
d_CET$Population_Lat <- factor(d_CET$Population, levels= c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))
d_CET$Population_Lon <- factor(d_CET$Population, levels= c("RE","GI","KA","MU","MA","AK","UM","YE","VA"))
d_CET$Population_Alt <- factor(d_CET$Population, levels= c("KA","AK","GI","RE","UM","VA","MU","MA","YE"))
d_CET$Condition <- as.factor(d_CET$Condition)
d_CET$CET_hours_MESA <- as.numeric(d_CET$CET_hours_MESA)
d_CET$CET_hours_LSPR <- as.numeric(d_CET$CET_hours_LSPR)
d_CET$Period_MESA <- as.numeric(d_CET$Period_MESA)
d_CET$Period_LSPR <- as.numeric(d_CET$Period_LSPR)
d_CET$Rhythmicity_LSPR_amplitude <- as.numeric(d_CET$Rhythmicity_LSPR_amplitude)
d_CET$Rhythmicity_JTK_p_BH_corrected <- as.numeric(d_CET$Rhythmicity_JTK_p_BH_corrected)
str(d_CET)
## 'data.frame': 36 obs. of 19 variables:
## $ Supervisor.PI : Factor w/ 1 level "Wegener": 1 1 1 1 1 1 1 1 1 1 ...
## $ Diet : Factor w/ 1 level "NS": 1 1 1 1 1 1 1 1 1 1 ...
## $ total...of.flies : int 1897 793 1938 1355 2349 1418 1178 1544 2150 1236 ...
## $ Batch : Factor w/ 4 levels "1","2","3","4": 2 2 2 2 3 2 1 2 3 2 ...
## $ Population : chr "AK" "GI" "KA" "MA" ...
## $ Line : chr "mixed population" "mixed population" "mixed population" "mixed population" ...
## $ Sex : chr "mixed sex" "mixed sex" "mixed sex" "mixed sex" ...
## $ ReplicateVial : logi NA NA NA NA NA NA ...
## $ Individual : logi NA NA NA NA NA NA ...
## $ Condition : Factor w/ 4 levels "18_LD_DD","18_LD_LD",..: 1 1 1 1 1 1 1 1 1 2 ...
## $ CET_hours_MESA : num 13.2 10.5 14 16.8 10.5 ...
## $ CET_hours_LSPR : num 12.5 10.5 11.7 17.5 11 ...
## $ Period_MESA : num 24.2 24.8 24.1 23.3 24.9 ...
## $ Period_LSPR : num 24.4 24.8 24.8 23.1 24.7 ...
## $ Rhythmicity_LSPR_amplitude : num 11.66 6.55 9.75 7.47 16.88 ...
## $ Rhythmicity_JTK_p_BH_corrected: num 5.26e-24 6.27e-22 6.76e-14 2.92e-09 4.21e-24 ...
## $ Population_Lat : Factor w/ 9 levels "YE","RE","GI",..: 9 3 7 5 4 2 6 8 1 9 ...
## $ Population_Lon : Factor w/ 9 levels "RE","GI","KA",..: 6 2 3 5 4 1 7 9 8 6 ...
## $ Population_Alt : Factor w/ 9 levels "KA","AK","GI",..: 2 3 1 8 7 4 5 6 9 2 ...
d_CET_18_LD_DD <-subset(d_CET,Condition=='18_LD_DD')
d_CET_18_LD_LD <-subset(d_CET,Condition=='18_LD_LD')
d_CET_29_LD_DD <-subset(d_CET,Condition=='29_LD_DD')
d_CET_29_LD_LD <-subset(d_CET,Condition=='29_LD_LD')
Descriptive statistics for CET_hours_MESA :
table_CET_18LDDD_CET_MESA <- write.csv(d_CET_18_LD_DD %>% group_by(Supervisor.PI, Condition, Population) %>%
summarise_at(vars(CET_hours_MESA),
list(Mean = mean)),
file = "CircadianEclosion/table_CET_18LDDD_CET_MESA.csv", row.names = T)
table_CET_18LDDD_CET_MESA <- read.csv("CircadianEclosion/table_CET_18LDDD_CET_MESA.csv")
DT::datatable(table_CET_18LDDD_CET_MESA, options = list(pageLength = 10)) %>% formatRound(5:5, 3)
Descriptive statistics for CET_hours_LSPR :
table_CET_18LDDD_CET_LSPR <- write.csv(d_CET_18_LD_DD %>% group_by(Supervisor.PI, Condition, Population) %>%
summarise_at(vars(CET_hours_LSPR),
list(Mean = mean)),
file = "CircadianEclosion/table_CET_18LDDD_CET_LSPR.csv", row.names = T)
table_CET_18LDDD_CET_LSPR <- read.csv("CircadianEclosion/table_CET_18LDDD_CET_LSPR.csv")
DT::datatable(table_CET_18LDDD_CET_LSPR, options = list(pageLength = 10)) %>% formatRound(5:5, 3)
Descriptive statistics for Period_MESA :
table_CET_18LDDD_Period_MESA <- write.csv(d_CET_18_LD_DD %>% group_by(Supervisor.PI, Condition, Population) %>%
summarise_at(vars(Period_MESA),
list(Mean = mean)),
file = "CircadianEclosion/table_CET_18LDDD_Period_MESA.csv", row.names = T)
table_CET_18LDDD_Period_MESA <- read.csv("CircadianEclosion/table_CET_18LDDD_Period_MESA.csv")
DT::datatable(table_CET_18LDDD_Period_MESA, options = list(pageLength = 10)) %>% formatRound(5:5, 3)
Descriptive statistics for Period_LSPR :
table_CET_18LDDD_Period_LSPR <- write.csv(d_CET_18_LD_DD %>% group_by(Supervisor.PI, Condition, Population) %>%
summarise_at(vars(Period_LSPR),
list(Mean = mean)),
file = "CircadianEclosion/table_CET_18LDDD_Period_LSPR.csv", row.names = T)
table_CET_18LDDD_Period_LSPR <- read.csv("CircadianEclosion/table_CET_18LDDD_Period_LSPR.csv")
DT::datatable(table_CET_18LDDD_Period_LSPR, options = list(pageLength = 10)) %>% formatRound(5:5, 3)
Descriptive statistics for Rhythmicity_LSPR_amplitude :
table_CET_18LDDD_Rhy_LSPR <- write.csv(d_CET_18_LD_DD %>% group_by(Supervisor.PI, Condition, Population) %>%
summarise_at(vars(Rhythmicity_LSPR_amplitude),
list(Mean = mean)),
file = "CircadianEclosion/table_CET_18LDDD_Rhy_LSPR.csv", row.names = T)
table_CET_18LDDD_Rhy_LSPR <- read.csv("CircadianEclosion/table_CET_18LDDD_Rhy_LSPR.csv")
DT::datatable(table_CET_18LDDD_Rhy_LSPR, options = list(pageLength = 10)) %>% formatRound(5:5, 3)
Descriptive statistics for Rhythmicity_JTK_p_BH_corrected :
table_CET_18LDDD_Rhy_JTK <- write.csv(d_CET_18_LD_DD %>% group_by(Supervisor.PI, Condition, Population) %>%
summarise_at(vars(Rhythmicity_JTK_p_BH_corrected),
list(Mean = mean)),
file = "CircadianEclosion/table_CET_18LDDD_Rhy_JTK.csv", row.names = T)
table_CET_18LDDD_Rhy_JTK <- read.csv("CircadianEclosion/table_CET_18LDDD_Rhy_JTK.csv")
DT::datatable(table_CET_18LDDD_Rhy_JTK, options = list(pageLength = 10)) %>% formatRound(5:5, 3)
Descriptive statistics for CET_hours_MESA :
table_CET_18LDLD_CET_MESA <- write.csv(d_CET_18_LD_LD %>% group_by(Supervisor.PI, Condition, Population) %>%
summarise_at(vars(CET_hours_MESA),
list(Mean = mean)),
file = "CircadianEclosion/table_CET_18LDLD_CET_MESA.csv", row.names = T)
table_CET_18LDLD_CET_MESA <- read.csv("CircadianEclosion/table_CET_18LDLD_CET_MESA.csv")
DT::datatable(table_CET_18LDLD_CET_MESA, options = list(pageLength = 10)) %>% formatRound(5:5, 3)
Descriptive statistics for CET_hours_LSPR :
table_CET_18LDLD_CET_LSPR <- write.csv(d_CET_18_LD_LD %>% group_by(Supervisor.PI, Condition, Population) %>%
summarise_at(vars(CET_hours_LSPR),
list(Mean = mean)),
file = "CircadianEclosion/table_CET_18LDLD_CET_LSPR.csv", row.names = T)
table_CET_18LDLD_CET_LSPR <- read.csv("CircadianEclosion/table_CET_18LDLD_CET_LSPR.csv")
DT::datatable(table_CET_18LDLD_CET_LSPR, options = list(pageLength = 10)) %>% formatRound(5:5, 3)
Descriptive statistics for Period_MESA :
table_CET_18LDLD_Period_MESA <- write.csv(d_CET_18_LD_LD %>% group_by(Supervisor.PI, Condition, Population) %>%
summarise_at(vars(Period_MESA),
list(Mean = mean)),
file = "CircadianEclosion/table_CET_18LDLD_Period_MESA.csv", row.names = T)
table_CET_18LDLD_Period_MESA <- read.csv("CircadianEclosion/table_CET_18LDLD_Period_MESA.csv")
DT::datatable(table_CET_18LDLD_Period_MESA, options = list(pageLength = 10)) %>% formatRound(5:5, 3)
Descriptive statistics for Period_LSPR :
table_CET_18LDLD_Period_LSPR <- write.csv(d_CET_18_LD_LD %>% group_by(Supervisor.PI, Condition, Population) %>%
summarise_at(vars(Period_LSPR),
list(Mean = mean)),
file = "CircadianEclosion/table_CET_18LDLD_Period_LSPR.csv", row.names = T)
table_CET_18LDLD_Period_LSPR <- read.csv("CircadianEclosion/table_CET_18LDLD_Period_LSPR.csv")
DT::datatable(table_CET_18LDLD_Period_LSPR, options = list(pageLength = 10)) %>% formatRound(5:5, 3)
Descriptive statistics for Rhythmicity_LSPR_amplitude :
table_CET_18LDLD_Rhy_LSPR <- write.csv(d_CET_18_LD_LD %>% group_by(Supervisor.PI, Condition, Population) %>%
summarise_at(vars(Rhythmicity_LSPR_amplitude),
list(Mean = mean)),
file = "CircadianEclosion/table_CET_18LDLD_Rhy_LSPR.csv", row.names = T)
table_CET_18LDLD_Rhy_LSPR <- read.csv("CircadianEclosion/table_CET_18LDLD_Rhy_LSPR.csv")
DT::datatable(table_CET_18LDLD_Rhy_LSPR, options = list(pageLength = 10)) %>% formatRound(5:5, 3)
Descriptive statistics for Rhythmicity_JTK_p_BH_corrected :
table_CET_18LDLD_Rhy_JTK <- write.csv(d_CET_18_LD_LD %>% group_by(Supervisor.PI, Condition, Population) %>%
summarise_at(vars(Rhythmicity_JTK_p_BH_corrected),
list(Mean = mean)),
file = "CircadianEclosion/table_CET_18LDLD_Rhy_JTK.csv", row.names = T)
table_CET_18LDLD_Rhy_JTK <- read.csv("CircadianEclosion/table_CET_18LDLD_Rhy_JTK.csv")
DT::datatable(table_CET_18LDLD_Rhy_JTK, options = list(pageLength = 10)) %>% formatRound(5:5, 3)
Descriptive statistics for CET_hours_MESA :
table_CET_29LDDD_CET_MESA <- write.csv(d_CET_29_LD_DD %>% group_by(Supervisor.PI, Condition, Population) %>%
summarise_at(vars(CET_hours_MESA),
list(Mean = mean)),
file = "CircadianEclosion/table_CET_29LDDD_CET_MESA.csv", row.names = T)
table_CET_29LDDD_CET_MESA <- read.csv("CircadianEclosion/table_CET_29LDDD_CET_MESA.csv")
DT::datatable(table_CET_29LDDD_CET_MESA, options = list(pageLength = 10)) %>% formatRound(5:5, 3)
Descriptive statistics for CET_hours_LSPR :
table_CET_29LDDD_CET_LSPR <- write.csv(d_CET_29_LD_DD %>% group_by(Supervisor.PI, Condition, Population) %>%
summarise_at(vars(CET_hours_LSPR),
list(Mean = mean)),
file = "CircadianEclosion/table_CET_29LDDD_CET_LSPR.csv", row.names = T)
table_CET_29LDDD_CET_LSPR <- read.csv("CircadianEclosion/table_CET_29LDDD_CET_LSPR.csv")
DT::datatable(table_CET_29LDDD_CET_LSPR, options = list(pageLength = 10)) %>% formatRound(5:5, 3)
Descriptive statistics for Period_MESA :
table_CET_29LDDD_Period_MESA <- write.csv(d_CET_29_LD_DD %>% group_by(Supervisor.PI, Condition, Population) %>%
summarise_at(vars(Period_MESA),
list(Mean = mean)),
file = "CircadianEclosion/table_CET_29LDDD_Period_MESA.csv", row.names = T)
table_CET_29LDDD_Period_MESA <- read.csv("CircadianEclosion/table_CET_29LDDD_Period_MESA.csv")
DT::datatable(table_CET_29LDDD_Period_MESA, options = list(pageLength = 10)) %>% formatRound(5:5, 3)
Descriptive statistics for Period_LSPR :
table_CET_29LDDD_Period_LSPR <- write.csv(d_CET_29_LD_DD %>% group_by(Supervisor.PI, Condition, Population) %>%
summarise_at(vars(Period_LSPR),
list(Mean = mean)),
file = "CircadianEclosion/table_CET_29LDDD_Period_LSPR.csv", row.names = T)
table_CET_29LDDD_Period_LSPR <- read.csv("CircadianEclosion/table_CET_29LDDD_Period_LSPR.csv")
DT::datatable(table_CET_29LDDD_Period_LSPR, options = list(pageLength = 10)) %>% formatRound(5:5, 3)
Descriptive statistics for Rhythmicity_LSPR_amplitude :
table_CET_29LDDD_Rhy_LSPR <- write.csv(d_CET_29_LD_DD %>% group_by(Supervisor.PI, Condition, Population) %>%
summarise_at(vars(Rhythmicity_LSPR_amplitude),
list(Mean = mean)),
file = "CircadianEclosion/table_CET_29LDDD_Rhy_LSPR.csv", row.names = T)
table_CET_29LDDD_Rhy_LSPR <- read.csv("CircadianEclosion/table_CET_29LDDD_Rhy_LSPR.csv")
DT::datatable(table_CET_29LDDD_Rhy_LSPR, options = list(pageLength = 10)) %>% formatRound(5:5, 3)
Descriptive statistics for Rhythmicity_JTK_p_BH_corrected :
table_CET_29LDDD_Rhy_JTK <- write.csv(d_CET_29_LD_DD %>% group_by(Supervisor.PI, Condition, Population) %>%
summarise_at(vars(Rhythmicity_JTK_p_BH_corrected),
list(Mean = mean)),
file = "CircadianEclosion/table_CET_29LDDD_Rhy_JTK.csv", row.names = T)
table_CET_29LDDD_Rhy_JTK <- read.csv("CircadianEclosion/table_CET_29LDDD_Rhy_JTK.csv")
DT::datatable(table_CET_29LDDD_Rhy_JTK, options = list(pageLength = 10)) %>% formatRound(5:5, 3)
Descriptive statistics for CET_hours_MESA :
table_CET_29LDLD_CET_MESA <- write.csv(d_CET_29_LD_LD %>% group_by(Supervisor.PI, Condition, Population) %>%
summarise_at(vars(CET_hours_MESA),
list(Mean = mean)),
file = "CircadianEclosion/table_CET_29LDLD_CET_MESA.csv", row.names = T)
table_CET_29LDLD_CET_MESA <- read.csv("CircadianEclosion/table_CET_29LDLD_CET_MESA.csv")
DT::datatable(table_CET_29LDLD_CET_MESA, options = list(pageLength = 10)) %>% formatRound(5:5, 3)
Descriptive statistics for CET_hours_LSPR :
table_CET_29LDLD_CET_LSPR <- write.csv(d_CET_29_LD_LD %>% group_by(Supervisor.PI, Condition, Population) %>%
summarise_at(vars(CET_hours_LSPR),
list(Mean = mean)),
file = "CircadianEclosion/table_CET_29LDLD_CET_LSPR.csv", row.names = T)
table_CET_29LDLD_CET_LSPR <- read.csv("CircadianEclosion/table_CET_29LDLD_CET_LSPR.csv")
DT::datatable(table_CET_29LDLD_CET_LSPR, options = list(pageLength = 10)) %>% formatRound(5:5, 3)
Descriptive statistics for Period_MESA :
table_CET_29LDLD_Period_MESA <- write.csv(d_CET_29_LD_LD %>% group_by(Supervisor.PI, Condition, Population) %>%
summarise_at(vars(Period_MESA),
list(Mean = mean)),
file = "CircadianEclosion/table_CET_29LDLD_Period_MESA.csv", row.names = T)
table_CET_29LDLD_Period_MESA <- read.csv("CircadianEclosion/table_CET_29LDLD_Period_MESA.csv")
DT::datatable(table_CET_29LDLD_Period_MESA, options = list(pageLength = 10)) %>% formatRound(5:5, 3)
Descriptive statistics for Period_LSPR :
table_CET_29LDLD_Period_LSPR <- write.csv(d_CET_29_LD_LD %>% group_by(Supervisor.PI, Condition, Population) %>%
summarise_at(vars(Period_LSPR),
list(Mean = mean)),
file = "CircadianEclosion/table_CET_29LDLD_Period_LSPR.csv", row.names = T)
table_CET_29LDLD_Period_LSPR <- read.csv("CircadianEclosion/table_CET_29LDLD_Period_LSPR.csv")
DT::datatable(table_CET_29LDLD_Period_LSPR, options = list(pageLength = 10)) %>% formatRound(5:5, 3)
Descriptive statistics for Rhythmicity_LSPR_amplitude :
table_CET_29LDLD_Rhy_LSPR <- write.csv(d_CET_29_LD_LD %>% group_by(Supervisor.PI, Condition, Population) %>%
summarise_at(vars(Rhythmicity_LSPR_amplitude),
list(Mean = mean)),
file = "CircadianEclosion/table_CET_29LDLD_Rhy_LSPR.csv", row.names = T)
table_CET_29LDLD_Rhy_LSPR <- read.csv("CircadianEclosion/table_CET_29LDLD_Rhy_LSPR.csv")
DT::datatable(table_CET_29LDLD_Rhy_LSPR, options = list(pageLength = 10)) %>% formatRound(5:5, 3)
Descriptive statistics for Rhythmicity_JTK_p_BH_corrected :
table_CET_29LDLD_Rhy_JTK <- write.csv(d_CET_29_LD_LD %>% group_by(Supervisor.PI, Condition, Population) %>%
summarise_at(vars(Rhythmicity_JTK_p_BH_corrected),
list(Mean = mean)),
file = "CircadianEclosion/table_CET_29LDLD_Rhy_JTK.csv", row.names = T)
table_CET_29LDLD_Rhy_JTK <- read.csv("CircadianEclosion/table_CET_29LDLD_Rhy_JTK.csv")
DT::datatable(table_CET_29LDLD_Rhy_JTK, options = list(pageLength = 10)) %>% formatRound(5:5, 3)
From Chris :
knitr::include_graphics("CircadianEclosion/FromChris/Graphs_plate_MESA.png")
From Eran :
knitr::include_graphics("CircadianEclosion/FromEran/eclosion_data_Christian_Page_1.png")
knitr::include_graphics("CircadianEclosion/FromEran/eclosion_data_Christian_Page_2.png")
dir.create(file.path("Locomotor"), showWarnings = FALSE)
For a detailed description of tables, plots, linear models and outputs, please refer here
#Note that the trait has been phenotyped only in males.
Tauber Lab : Bettina Fishman, Eran Tauber
d_LA <- read.csv("MasterSheets_Oct21_git/LA_MasterSheet_Oct21.csv")
str(d_LA)
## 'data.frame': 639 obs. of 19 variables:
## $ Supervisor.PI : chr "Tauber" "Tauber" "Tauber" "Tauber" ...
## $ Diet : chr "NS" "NS" "NS" "NS" ...
## $ Batch : int 1 1 1 1 1 1 1 1 1 1 ...
## $ Population : chr "YE" "YE" "YE" "YE" ...
## $ Line : chr "YE27" "YE33" "YE40" "YE40" ...
## $ Data.Label : chr "YE 29-9-18" "YE 33-9-18" "YE 40-9-18" "YE 40-9-18" ...
## $ Sex : chr "M" "M" "M" "M" ...
## $ ReplicateChamberOld: int 3 3 3 3 3 3 3 3 3 3 ...
## $ ReplicateChamber : chr "Tauber_1_YE27_M_3" "Tauber_1_YE33_M_3" "Tauber_1_YE40_M_3" "Tauber_1_YE40_M_3" ...
## $ Period : num 23.6 20.2 24 24.2 23.1 ...
## $ CircPhase : num 23.21 13.07 4.59 9.32 12.98 ...
## $ AbsPhase : num 12.5 0.7 11.7 12.5 12.5 12 12.7 0.5 12.4 12.6 ...
## $ Experiment : int 1 1 1 1 1 1 1 1 1 1 ...
## $ ND : num 0.678 0.95 1.083 0.948 1.455 ...
## $ Activity : num 29.2 46.8 45.4 37.8 37.8 31.8 43.6 42.8 29.6 21.6 ...
## $ Country : chr "Turkey" "Turkey" "Turkey" "Turkey" ...
## $ Latitude : num 40.2 40.2 40.2 40.2 40.2 ...
## $ Longitude : num 32.3 32.3 32.3 32.3 32.3 ...
## $ Altitude : int 680 680 680 680 680 680 680 680 680 680 ...
d_LA$Supervisor.PI <- as.factor(d_LA$Supervisor.PI)
d_LA$Diet <- as.factor(d_LA$Diet)
d_LA$Batch <- as.factor(d_LA$Batch)
d_LA$Population_Lat <- factor(d_LA$Population, levels= c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))
d_LA$Population_Lon <- factor(d_LA$Population, levels= c("RE","GI","KA","MU","MA","AK","UM","YE","VA"))
d_LA$Population_Alt <- factor(d_LA$Population, levels= c("KA","AK","GI","RE","UM","VA","MU","MA","YE"))
d_LA$Line <- as.factor(d_LA$Line)
d_LA$ReplicateChamber <- as.factor(d_LA$ReplicateChamber)
d_LA$Period <- as.numeric(d_LA$Period)
d_LA$CircPhase <- as.numeric(d_LA$CircPhase)
d_LA$AbsPhase <- as.numeric(d_LA$AbsPhase)
d_LA$Experiment <- as.numeric(d_LA$Experiment)
d_LA$ND <- as.numeric(d_LA$ND)
d_LA$Activity <- as.numeric(d_LA$Activity)
str(d_LA)
## 'data.frame': 639 obs. of 22 variables:
## $ Supervisor.PI : Factor w/ 1 level "Tauber": 1 1 1 1 1 1 1 1 1 1 ...
## $ Diet : Factor w/ 1 level "NS": 1 1 1 1 1 1 1 1 1 1 ...
## $ Batch : Factor w/ 2 levels "1","2": 1 1 1 1 1 1 1 1 1 1 ...
## $ Population : chr "YE" "YE" "YE" "YE" ...
## $ Line : Factor w/ 92 levels "AK1","AK2","AK3",..: 84 85 86 86 86 89 90 90 91 91 ...
## $ Data.Label : chr "YE 29-9-18" "YE 33-9-18" "YE 40-9-18" "YE 40-9-18" ...
## $ Sex : chr "M" "M" "M" "M" ...
## $ ReplicateChamberOld: int 3 3 3 3 3 3 3 3 3 3 ...
## $ ReplicateChamber : Factor w/ 152 levels "Tauber_1_AK1_M_9",..: 76 77 78 78 78 79 80 80 81 81 ...
## $ Period : num 23.6 20.2 24 24.2 23.1 ...
## $ CircPhase : num 23.21 13.07 4.59 9.32 12.98 ...
## $ AbsPhase : num 12.5 0.7 11.7 12.5 12.5 12 12.7 0.5 12.4 12.6 ...
## $ Experiment : num 1 1 1 1 1 1 1 1 1 1 ...
## $ ND : num 0.678 0.95 1.083 0.948 1.455 ...
## $ Activity : num 29.2 46.8 45.4 37.8 37.8 31.8 43.6 42.8 29.6 21.6 ...
## $ Country : chr "Turkey" "Turkey" "Turkey" "Turkey" ...
## $ Latitude : num 40.2 40.2 40.2 40.2 40.2 ...
## $ Longitude : num 32.3 32.3 32.3 32.3 32.3 ...
## $ Altitude : int 680 680 680 680 680 680 680 680 680 680 ...
## $ Population_Lat : Factor w/ 9 levels "YE","RE","GI",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Population_Lon : Factor w/ 9 levels "RE","GI","KA",..: 8 8 8 8 8 8 8 8 8 8 ...
## $ Population_Alt : Factor w/ 9 levels "KA","AK","GI",..: 9 9 9 9 9 9 9 9 9 9 ...
Descriptive statistics at the line level, with batch information :
table_LA_Act_Line_wbatch <- write.csv(d_LA %>% group_by(Supervisor.PI, Batch, Sex, Population, Line) %>%
summarise_at(vars(Activity),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "Locomotor/table_LA_Act_Line_wbatch.csv", row.names = T)
table_LA_Act_Line_wbatch <- read.csv("Locomotor/table_LA_Act_Line_wbatch.csv")
Descriptive statistics at the line level, without batch information :
table_LA_Act_Line_wobatch <- write.csv(d_LA %>% group_by(Supervisor.PI, Sex, Population, Line) %>%
summarise_at(vars(Activity),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "Locomotor/table_LA_Act_Line_wobatch.csv", row.names = T)
table_LA_Act_Line_wobatch <- read.csv("Locomotor/table_LA_Act_Line_wobatch.csv")
Descriptive statistics at the population level, with batch information :
table_LA_Act_Pop_wbatch <- write.csv(d_LA %>% group_by(Supervisor.PI, Batch, Sex, Population) %>%
summarise_at(vars(Activity),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "Locomotor/table_LA_Act_Pop_wbatch.csv", row.names = T)
table_LA_Act_Pop_wbatch <- read.csv("Locomotor/table_LA_Act_Pop_wbatch.csv")
Descriptive statistics at the population level, without batch information :
table_LA_Act_Pop_wobatch <- write.csv(d_LA %>% group_by(Supervisor.PI, Sex, Population) %>%
summarise_at(vars(Activity),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "Locomotor/table_LA_Act_Pop_wobatch.csv", row.names = T)
table_LA_Act_Pop_wobatch <- read.csv("Locomotor/table_LA_Act_Pop_wobatch.csv")
Descriptive statistics at the line level, with batch information :
table_LA_ND_Line_wbatch <- write.csv(d_LA %>% group_by(Supervisor.PI, Batch, Sex, Population, Line) %>%
summarise_at(vars(ND),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "Locomotor/table_LA_ND_Line_wbatch.csv", row.names = T)
table_LA_ND_Line_wbatch <- read.csv("Locomotor/table_LA_ND_Line_wbatch.csv")
Descriptive statistics at the line level, without batch information :
table_LA_ND_Line_wobatch <- write.csv(d_LA %>% group_by(Supervisor.PI, Sex, Population, Line) %>%
summarise_at(vars(ND),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "Locomotor/table_LA_ND_Line_wobatch.csv", row.names = T)
table_LA_ND_Line_wobatch <- read.csv("Locomotor/table_LA_ND_Line_wobatch.csv")
Descriptive statistics at the population level, with batch information :
table_LA_ND_Pop_wbatch <- write.csv(d_LA %>% group_by(Supervisor.PI, Batch, Sex, Population) %>%
summarise_at(vars(ND),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "Locomotor/table_LA_ND_Pop_wbatch.csv", row.names = T)
table_LA_ND_Pop_wbatch <- read.csv("Locomotor/table_LA_ND_Pop_wbatch.csv")
Descriptive statistics at the population level, without batch information :
table_LA_ND_Pop_wobatch <- write.csv(d_LA %>% group_by(Supervisor.PI, Sex, Population) %>%
summarise_at(vars(ND),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "Locomotor/table_LA_ND_Pop_wobatch.csv", row.names = T)
table_LA_ND_Pop_wobatch <- read.csv("Locomotor/table_LA_ND_Pop_wobatch.csv")
Descriptive statistics at the line level, with batch information :
table_LA_CircPhase_Line_wbatch <- write.csv(d_LA %>% group_by(Supervisor.PI, Batch, Sex, Population, Line) %>%
summarise_at(vars(CircPhase),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "Locomotor/table_LA_CircPhase_Line_wbatch.csv", row.names = T)
table_LA_CircPhase_Line_wbatch <- read.csv("Locomotor/table_LA_CircPhase_Line_wbatch.csv")
Descriptive statistics at the line level, without batch information :
table_LA_CircPhase_Line_wobatch <- write.csv(d_LA %>% group_by(Supervisor.PI, Sex, Population, Line) %>%
summarise_at(vars(CircPhase),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "Locomotor/table_LA_CircPhase_Line_wobatch.csv", row.names = T)
table_LA_CircPhase_Line_wobatch <- read.csv("Locomotor/table_LA_CircPhase_Line_wobatch.csv")
Descriptive statistics at the population level, with batch information :
table_LA_CircPhase_Pop_wbatch <- write.csv(d_LA %>% group_by(Supervisor.PI, Batch, Sex, Population) %>%
summarise_at(vars(CircPhase),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "Locomotor/table_LA_CircPhase_Pop_wbatch.csv", row.names = T)
table_LA_CircPhase_Pop_wbatch <- read.csv("Locomotor/table_LA_CircPhase_Pop_wbatch.csv")
Descriptive statistics at the population level, without batch information :
table_LA_CircPhase_Pop_wobatch <- write.csv(d_LA %>% group_by(Supervisor.PI, Sex, Population) %>%
summarise_at(vars(CircPhase),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "Locomotor/table_LA_CircPhase_Pop_wobatch.csv", row.names = T)
table_LA_CircPhase_Pop_wobatch <- read.csv("Locomotor/table_LA_CircPhase_Pop_wobatch.csv")
ND
LA_lmer_ND_Tauber <- lmer(ND ~ -1 + Population + (1|Line:Population) +
(1|Batch), data = (d_LA))
## Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
## Model failed to converge with max|grad| = 0.00214269 (tol = 0.002, component 1)
capture.output(summary(LA_lmer_ND_Tauber),file = "Locomotor/LA_lmer_ND_Tauber_sum.txt")
capture.output(anova(LA_lmer_ND_Tauber),file = "Locomotor/LA_lmer_ND_Tauber.txt")
capture.output(emmeans(LA_lmer_ND_Tauber, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "Locomotor/LA_lmer_ND_Tauber_tk.txt")
anova(LA_lmer_ND_Tauber)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 182.2 20.245 9 74.675 136.84 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(LA_lmer_ND_Tauber)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ND ~ -1 + Population + (1 | Line:Population) + (1 | Batch)
## Data: (d_LA)
##
## REML criterion at convergence: 703.3
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.1922 -0.4257 -0.0668 0.2481 11.4146
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 3.972e-02 0.1993100
## Batch (Intercept) 1.608e-09 0.0000401
## Residual 1.479e-01 0.3846341
## Number of obs: 639, groups: Line:Population, 92; Batch, 2
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 0.86109 0.08409 63.09959 10.240 4.83e-15 ***
## PopulationGI 0.85162 0.08587 75.56622 9.918 2.52e-15 ***
## PopulationKA 1.02359 0.07759 67.28287 13.193 < 2e-16 ***
## PopulationMA 0.95795 0.07734 67.48095 12.386 < 2e-16 ***
## PopulationMU 0.86577 0.08728 95.77068 9.919 2.27e-16 ***
## PopulationRE 0.88107 0.09339 84.94375 9.435 7.17e-15 ***
## PopulationUM 0.80411 0.08216 69.94382 9.787 9.80e-15 ***
## PopulationVA 0.91036 0.08277 66.44809 10.998 < 2e-16 ***
## PopulationYE 1.08890 0.06321 98.77181 17.226 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.000
## PopulatinKA 0.000 0.000
## PopulatinMA 0.000 0.000 0.000
## PopulatinMU 0.000 0.000 0.000 0.000
## PopulatinRE 0.000 0.000 0.000 0.000 0.000
## PopulatinUM 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinVA 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinYE 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## optimizer (nloptwrap) convergence code: 0 (OK)
## Model failed to converge with max|grad| = 0.00214269 (tol = 0.002, component 1)
CircPhase
LA_lmer_CircPhase_Tauber <- lmer(CircPhase ~ -1 + Population + (1|Line:Population) +
(1|Batch) , data = (d_LA))
capture.output(summary(LA_lmer_CircPhase_Tauber),file = "Locomotor/LA_lmer_CircPhase_Tauber_sum.txt")
capture.output(anova(LA_lmer_CircPhase_Tauber),file = "Locomotor/LA_lmer_CircPhase_Tauber.txt")
capture.output(emmeans(LA_lmer_CircPhase_Tauber, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "Locomotor/LA_lmer_CircPhase_Tauber_tk.txt")
anova(LA_lmer_CircPhase_Tauber)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 26773 2974.8 9 2 63.875 0.01551 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(LA_lmer_CircPhase_Tauber)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: CircPhase ~ -1 + Population + (1 | Line:Population) + (1 | Batch)
## Data: (d_LA)
##
## REML criterion at convergence: 4247.6
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.10384 -0.57625 -0.06697 0.85374 1.83691
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 0.04096 0.2024
## Batch (Intercept) 0.41358 0.6431
## Residual 46.57281 6.8244
## Number of obs: 639, groups: Line:Population, 92; Batch, 2
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 9.0667 0.9362 8.2604 9.684 8.62e-06 ***
## PopulationGI 13.2114 0.9879 10.3499 13.374 7.30e-08 ***
## PopulationKA 14.0128 0.8646 6.1489 16.206 2.82e-06 ***
## PopulationMA 12.9574 0.8807 6.6656 14.712 2.50e-06 ***
## PopulationMU 12.1721 1.0796 14.7993 11.275 1.16e-08 ***
## PopulationRE 13.2907 1.1150 13.9621 11.920 1.05e-08 ***
## PopulationUM 10.9990 0.9320 8.2560 11.801 1.87e-06 ***
## PopulationVA 12.9768 0.9065 7.2307 14.316 1.44e-06 ***
## PopulationYE 12.9227 0.8484 5.9741 15.231 5.25e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.224
## PopulatinKA 0.253 0.242
## PopulatinMA 0.245 0.237 0.273
## PopulatinMU 0.210 0.194 0.220 0.214
## PopulatinRE 0.176 0.187 0.219 0.224 0.161
## PopulatinUM 0.234 0.225 0.257 0.254 0.204 0.205
## PopulatinVA 0.236 0.231 0.265 0.264 0.208 0.221 0.247
## PopulatinYE 0.253 0.246 0.284 0.281 0.222 0.235 0.263 0.274
Activity
LA_lmer_Activity_Tauber <- lmer(Activity ~ -1 + Population + (1|Line:Population) +
(1|Batch), data = (d_LA))
capture.output(summary(LA_lmer_Activity_Tauber),file = "Locomotor/LA_lmer_Activity_Tauber_sum.txt")
capture.output(anova(LA_lmer_Activity_Tauber),file = "Locomotor/LA_lmer_Activity_Tauber.txt")
capture.output(emmeans(LA_lmer_Activity_Tauber, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "Locomotor/LA_lmer_Activity_Tauber_tk.txt")
anova(LA_lmer_Activity_Tauber)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 19295 2143.9 9 2 31.03 0.0316 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(LA_lmer_Activity_Tauber)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Activity ~ -1 + Population + (1 | Line:Population) + (1 | Batch)
## Data: (d_LA)
##
## REML criterion at convergence: 4624.6
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.16030 -0.55380 0.07697 0.65610 2.31656
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 41.72 6.459
## Batch (Intercept) 7.27 2.696
## Residual 69.09 8.312
## Number of obs: 639, groups: Line:Population, 92; Batch, 2
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 31.197 3.140 6.396 9.935 4.02e-05 ***
## PopulationGI 34.315 3.129 6.353 10.967 2.31e-05 ***
## PopulationKA 35.781 2.968 5.186 12.057 5.45e-05 ***
## PopulationMA 36.842 2.964 5.160 12.430 4.83e-05 ***
## PopulationMU 25.126 3.109 6.236 8.081 0.000158 ***
## PopulationRE 38.221 3.299 7.751 11.586 3.62e-06 ***
## PopulationUM 25.960 3.066 5.865 8.468 0.000167 ***
## PopulationVA 28.507 3.087 6.020 9.235 8.93e-05 ***
## PopulationYE 34.247 2.606 3.152 13.142 0.000738 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.370
## PopulatinKA 0.390 0.391
## PopulatinMA 0.389 0.392 0.413
## PopulatinMU 0.373 0.374 0.394 0.394
## PopulatinRE 0.345 0.351 0.371 0.375 0.352
## PopulatinUM 0.377 0.379 0.400 0.400 0.381 0.361
## PopulatinVA 0.373 0.376 0.397 0.398 0.378 0.361 0.385
## PopulatinYE 0.442 0.446 0.470 0.472 0.448 0.428 0.456 0.453
From Eran :
Red letters denote significant difference by Multiple Comparisons of Means: Tukey Contrasts
knitr::include_graphics("Locomotor/FromEran/pheno2022_Page_1.png")
knitr::include_graphics("Locomotor/FromEran/pheno2022_Page_2.png")
knitr::include_graphics("Locomotor/FromEran/pheno2022_Page_3.png")
Phase in DD represented in angle. The mean and 95 confidence limits are shown. CI limits in red indicate uniform distribution (low concentration. i.e. Rayleigh test not significant).
knitr::include_graphics("Locomotor/FromEran/pheno2022_Page_4.png")
Oriana 3 (Stacked circular).
knitr::include_graphics("Locomotor/FromEran/pheno2022_Page_5.png")
dir.create(file.path("Starvation"), showWarnings = FALSE)
For a detailed description of tables, plots, linear models and outputs, please refer here
Gonzalez Lab : Llewellyn Green, Josefa Gonzalez, Miriam Merenciano
Onder Lab : Seda Coskun, Ekin Demir, Senel Selin Senkal, Cansu Aksoy
Pasyukova Lab : Alexander Symonenko, Natalia Roshina, Mikhail Trostnokov, Ekaterina Veselkina, Evgenia Tsybul’ko, Olga Rybina, Elena Pasyukova
d_SR <- read.csv("MasterSheets_Oct21_git/SR_MasterSheet_Nov21.csv")
str(d_SR)
## 'data.frame': 78315 obs. of 14 variables:
## $ Supervisor.PI : chr "Gonzalez" "Gonzalez" "Gonzalez" "Gonzalez" ...
## $ Diet : chr "S" "S" "S" "S" ...
## $ Batch : int 1 1 1 1 1 1 1 1 1 1 ...
## $ Population : chr "AK" "AK" "AK" "AK" ...
## $ Line : chr "AK1" "AK1" "AK1" "AK1" ...
## $ Sex : chr "F" "F" "F" "F" ...
## $ ReplicateVialOld: int 1 1 1 1 1 1 1 1 1 1 ...
## $ ReplicateVial : chr "Gonzalez_1_AK1_F_1" "Gonzalez_1_AK1_F_1" "Gonzalez_1_AK1_F_1" "Gonzalez_1_AK1_F_1" ...
## $ Individual : int 1 2 3 4 5 6 7 8 9 10 ...
## $ AgeAtDeath_hours: int 56 96 96 96 104 104 104 112 112 120 ...
## $ Country : chr "Finland" "Finland" "Finland" "Finland" ...
## $ Latitude : num 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 ...
## $ Longitude : num 23.5 23.5 23.5 23.5 23.5 ...
## $ Altitude : int 88 88 88 88 88 88 88 88 88 88 ...
d_SR$Supervisor.PI <- as.factor(d_SR$Supervisor.PI)
d_SR$Diet <- as.factor(d_SR$Diet)
d_SR$Batch <- as.factor(d_SR$Batch)
d_SR$Population_Lat <- factor(d_SR$Population, levels= c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))
d_SR$Population_Lon <- factor(d_SR$Population, levels= c("RE","GI","KA","MU","MA","AK","UM","YE","VA"))
d_SR$Population_Alt <- factor(d_SR$Population, levels= c("KA","AK","GI","RE","UM","VA","MU","MA","YE"))
d_SR$Line <- as.factor(d_SR$Line)
d_SR$Sex <- as.factor(d_SR$Sex)
d_SR$ReplicateVial <- as.factor(d_SR$ReplicateVial)
d_SR$AgeAtDeath_hours <- as.numeric(d_SR$AgeAtDeath_hours)
str(d_SR)
## 'data.frame': 78315 obs. of 17 variables:
## $ Supervisor.PI : Factor w/ 3 levels "Gonzalez","Onder",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Diet : Factor w/ 2 levels "NS","S": 2 2 2 2 2 2 2 2 2 2 ...
## $ Batch : Factor w/ 7 levels "1","2","3","4",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Population : chr "AK" "AK" "AK" "AK" ...
## $ Line : Factor w/ 171 levels "AK1","AK10","AK11",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Sex : Factor w/ 2 levels "F","M": 1 1 1 1 1 1 1 1 1 1 ...
## $ ReplicateVialOld: int 1 1 1 1 1 1 1 1 1 1 ...
## $ ReplicateVial : Factor w/ 7753 levels "Gonzalez_1_AK1_F_1",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Individual : int 1 2 3 4 5 6 7 8 9 10 ...
## $ AgeAtDeath_hours: num 56 96 96 96 104 104 104 112 112 120 ...
## $ Country : chr "Finland" "Finland" "Finland" "Finland" ...
## $ Latitude : num 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 ...
## $ Longitude : num 23.5 23.5 23.5 23.5 23.5 ...
## $ Altitude : int 88 88 88 88 88 88 88 88 88 88 ...
## $ Population_Lat : Factor w/ 9 levels "YE","RE","GI",..: 9 9 9 9 9 9 9 9 9 9 ...
## $ Population_Lon : Factor w/ 9 levels "RE","GI","KA",..: 6 6 6 6 6 6 6 6 6 6 ...
## $ Population_Alt : Factor w/ 9 levels "KA","AK","GI",..: 2 2 2 2 2 2 2 2 2 2 ...
d_SR_F <-subset(d_SR,Sex=='F')
d_SR_M <-subset(d_SR,Sex=='M')
Descriptive statistics at the line level, with batch information :
table_SR_Line_wbatch <- write.csv(d_SR %>% group_by(Supervisor.PI, Batch, Sex,Population, Line) %>%
summarise_at(vars(AgeAtDeath_hours),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "Starvation/table_SR_Line_wbatch.csv", row.names = T)
table_SR_Line_wbatch <- read.csv("Starvation/table_SR_Line_wbatch.csv")
Descriptive statistics at the line level, without batch information :
table_SR_Line_wobatch <- write.csv(d_SR %>% group_by(Supervisor.PI, Sex,Population, Line) %>%
summarise_at(vars(AgeAtDeath_hours),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "Starvation/table_SR_Line_wobatch.csv", row.names = T)
table_SR_Line_wobatch <- read.csv("Starvation/table_SR_Line_wobatch.csv")
Descriptive statistics at the population level, with batch information :
table_SR_Pop_wbatch <- write.csv(d_SR %>% group_by(Supervisor.PI, Batch, Sex, Population) %>%
summarise_at(vars(AgeAtDeath_hours),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "Starvation/table_SR_Pop_wbatch.csv", row.names = T)
table_SR_Pop_wbatch <- read.csv("Starvation/table_SR_Pop_wbatch.csv")
Descriptive statistics at the population level, without batch information :
table_SR_Pop_wobatch <- write.csv(d_SR %>% group_by(Supervisor.PI, Sex, Population) %>%
summarise_at(vars(AgeAtDeath_hours),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "Starvation/table_SR_Pop_wobatch.csv", row.names = T)
table_SR_Pop_wobatch <- read.csv("Starvation/table_SR_Pop_wobatch.csv")
min_SR <- min(d_SR$AgeAtDeath_hours)
max_SR <- max(d_SR$AgeAtDeath_hours)
p_SR_F <- ggplot(data = d_SR_F, aes(x=Population_Lat, y=AgeAtDeath_hours, fill=Supervisor.PI)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) + labs(title="p_SR_F", x="Population", y = "AgeAtDeath_hours") + ylim(c(min_SR, max_SR))+ droseu_theme
## quartz_off_screen
## 2
p_SR_M <- ggplot(data = d_SR_M, aes(x=Population_Lat, y=AgeAtDeath_hours, fill=Supervisor.PI)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) + labs(title="p_SR_M", x="Population", y = "AgeAtDeath_hours") + ylim(c(min_SR, max_SR))+ droseu_theme
## quartz_off_screen
## 2
SR_F_lmer_Gonzalez <- lmer(AgeAtDeath_hours ~ -1 + Population + (1|Line:Population) +
(1|Batch) + (1|ReplicateVial : Line : Population), data = (subset(d_SR_F,Supervisor.PI=='Gonzalez')))
capture.output(summary(SR_F_lmer_Gonzalez),file = "Starvation/SR_F_lmer_Gonzalez_sum.txt")
capture.output(anova(SR_F_lmer_Gonzalez),file = "Starvation/SR_F_lmer_Gonzalez.txt")
capture.output(emmeans(SR_F_lmer_Gonzalez, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "Starvation/SR_F_lmer_Gonzalez_tk.txt")
anova(SR_F_lmer_Gonzalez)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 704125 78236 9 56.752 231.46 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(SR_F_lmer_Gonzalez)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: AgeAtDeath_hours ~ -1 + Population + (1 | Line:Population) +
## (1 | Batch) + (1 | ReplicateVial:Line:Population)
## Data: (subset(d_SR_F, Supervisor.PI == "Gonzalez"))
##
## REML criterion at convergence: 43270.8
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -4.6657 -0.6316 -0.0456 0.5852 4.9362
##
## Random effects:
## Groups Name Variance Std.Dev.
## ReplicateVial:Line:Population (Intercept) 117.17 10.824
## Line:Population (Intercept) 126.21 11.234
## Batch (Intercept) 11.45 3.385
## Residual 338.01 18.385
## Number of obs: 4900, groups:
## ReplicateVial:Line:Population, 436; Line:Population, 141; Batch, 7
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 85.162 3.288 71.182 25.90 <2e-16 ***
## PopulationGI 74.698 3.914 105.480 19.08 <2e-16 ***
## PopulationKA 80.832 3.773 101.847 21.42 <2e-16 ***
## PopulationMA 79.731 3.262 76.797 24.44 <2e-16 ***
## PopulationMU 88.602 3.388 75.107 26.15 <2e-16 ***
## PopulationRE 79.754 3.906 106.983 20.42 <2e-16 ***
## PopulationUM 81.717 4.203 107.764 19.44 <2e-16 ***
## PopulationVA 88.398 3.616 83.263 24.44 <2e-16 ***
## PopulationYE 69.534 3.750 88.007 18.54 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.149
## PopulatinKA 0.148 0.119
## PopulatinMA 0.183 0.145 0.144
## PopulatinMU 0.194 0.148 0.145 0.183
## PopulatinRE 0.142 0.116 0.116 0.141 0.142
## PopulatinUM 0.149 0.116 0.114 0.142 0.149 0.112
## PopulatinVA 0.183 0.138 0.136 0.170 0.182 0.131 0.138
## PopulatinYE 0.181 0.136 0.133 0.168 0.181 0.129 0.137 0.170
SR_M_lmer_Gonzalez <- lmer(AgeAtDeath_hours ~ -1 + Population + (1|Line:Population) +
(1|Batch) + (1|ReplicateVial : Line : Population), data = (subset(d_SR_M,Supervisor.PI=='Gonzalez')))
capture.output(summary(SR_M_lmer_Gonzalez),file = "Starvation/SR_M_lmer_Gonzalez_sum.txt")
capture.output(anova(SR_M_lmer_Gonzalez),file = "Starvation/SR_M_lmer_Gonzalez.txt")
capture.output(emmeans(SR_M_lmer_Gonzalez, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "Starvation/SR_M_lmer_Gonzalez_tk.txt")
anova(SR_M_lmer_Gonzalez)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 45603 5067 9 34.009 33.912 1.958e-14 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(SR_M_lmer_Gonzalez)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: AgeAtDeath_hours ~ -1 + Population + (1 | Line:Population) +
## (1 | Batch) + (1 | ReplicateVial:Line:Population)
## Data: (subset(d_SR_M, Supervisor.PI == "Gonzalez"))
##
## REML criterion at convergence: 42786.5
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -4.8769 -0.6117 -0.0757 0.5087 8.1754
##
## Random effects:
## Groups Name Variance Std.Dev.
## ReplicateVial:Line:Population (Intercept) 49.61 7.043
## Line:Population (Intercept) 60.30 7.766
## Batch (Intercept) 79.31 8.905
## Residual 149.42 12.224
## Number of obs: 5335, groups:
## ReplicateVial:Line:Population, 481; Line:Population, 156; Batch, 7
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 59.290 3.992 11.231 14.85 9.84e-09 ***
## PopulationGI 51.077 4.115 12.673 12.41 1.84e-08 ***
## PopulationKA 59.083 4.103 12.533 14.40 3.62e-09 ***
## PopulationMA 53.956 3.946 10.758 13.67 3.85e-08 ***
## PopulationMU 64.822 4.006 11.386 16.18 3.27e-09 ***
## PopulationRE 54.826 4.097 12.472 13.38 9.11e-09 ***
## PopulationUM 57.365 4.222 13.979 13.59 1.91e-09 ***
## PopulationVA 57.791 3.944 10.734 14.65 1.95e-08 ***
## PopulationYE 47.775 3.939 10.686 12.13 1.39e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.704
## PopulatinKA 0.702 0.678
## PopulatinMA 0.734 0.708 0.707
## PopulatinMU 0.732 0.704 0.700 0.734
## PopulatinRE 0.691 0.672 0.674 0.701 0.690
## PopulatinUM 0.691 0.666 0.663 0.694 0.692 0.655
## PopulatinVA 0.736 0.709 0.708 0.740 0.735 0.701 0.695
## PopulatinYE 0.733 0.708 0.707 0.738 0.732 0.702 0.693 0.739
p_SR_F_Gonzalez <- ggplot(data = (subset(d_SR_F,Supervisor.PI=='Gonzalez')), aes(x=Population_Lat, y=AgeAtDeath_hours, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_SR_F_Gonzalez", x="Population", y = "AgeAtDeath_hours") + ylim(c(min_SR, max_SR))+ droseu_theme
## quartz_off_screen
## 2
p_SR_F_pop_Gonzalez <- ggplot(data = (subset(d_SR_F,Supervisor.PI=='Gonzalez')), aes(x=Population_Lat, y=AgeAtDeath_hours, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_SR_F_pop_Gonzalez", x="Population", y = "AgeAtDeath_hours") + ylim(c(min_SR, max_SR))+ droseu_theme
## quartz_off_screen
## 2
p_SR_M_Gonzalez <- ggplot(data = (subset(d_SR_M,Supervisor.PI=='Gonzalez')), aes(x=Population_Lat, y=AgeAtDeath_hours, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_SR_M_Gonzalez", x="Population", y = "AgeAtDeath_hours") + ylim(c(min_SR, max_SR))+ droseu_theme
## quartz_off_screen
## 2
p_SR_M_pop_Gonzalez <- ggplot(data = (subset(d_SR_M,Supervisor.PI=='Gonzalez')), aes(x=Population_Lat, y=AgeAtDeath_hours, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_SR_M_pop_Gonzalez", x="Population", y = "AgeAtDeath_hours") + ylim(c(min_SR, max_SR))+ droseu_theme
## quartz_off_screen
## 2
SR_F_lmer_Onder <- lmer(AgeAtDeath_hours ~ -1 + Population + (1|Line:Population) +
(1|Batch) + (1|ReplicateVial : Line : Population), data = (subset(d_SR_F,Supervisor.PI=='Onder')))
## boundary (singular) fit: see ?isSingular
## Warning: Model failed to converge with 1 negative eigenvalue: -6.7e+00
capture.output(summary(SR_F_lmer_Onder),file = "Starvation/SR_F_lmer_Onder_sum.txt")
capture.output(anova(SR_F_lmer_Onder),file = "Starvation/SR_F_lmer_Onder.txt")
capture.output(emmeans(SR_F_lmer_Onder, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "Starvation/SR_F_lmer_Onder_tk.txt")
anova(SR_F_lmer_Onder)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 2677788 297532 9 158.95 948.75 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(SR_F_lmer_Onder)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: AgeAtDeath_hours ~ -1 + Population + (1 | Line:Population) +
## (1 | Batch) + (1 | ReplicateVial:Line:Population)
## Data: (subset(d_SR_F, Supervisor.PI == "Onder"))
##
## REML criterion at convergence: 149434.3
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -5.0413 -0.6188 -0.0307 0.6086 3.9849
##
## Random effects:
## Groups Name Variance Std.Dev.
## ReplicateVial:Line:Population (Intercept) 9.720e+00 3.118e+00
## Line:Population (Intercept) 1.683e+02 1.297e+01
## Batch (Intercept) 3.004e-07 5.481e-04
## Residual 3.136e+02 1.771e+01
## Number of obs: 17282, groups:
## ReplicateVial:Line:Population, 1737; Line:Population, 168; Batch, 5
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 92.651 2.936 159.004 31.56 <2e-16 ***
## PopulationGI 88.175 3.390 159.025 26.01 <2e-16 ***
## PopulationKA 97.242 2.936 158.998 33.12 <2e-16 ***
## PopulationMA 92.373 2.936 159.020 31.46 <2e-16 ***
## PopulationMU 102.780 2.935 158.705 35.02 <2e-16 ***
## PopulationRE 88.775 3.282 158.821 27.05 <2e-16 ***
## PopulationUM 93.081 3.185 159.123 29.22 <2e-16 ***
## PopulationVA 102.602 2.935 158.816 34.96 <2e-16 ***
## PopulationYE 80.139 2.936 159.003 27.30 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.000
## PopulatinKA 0.000 0.000
## PopulatinMA 0.000 0.000 0.000
## PopulatinMU 0.000 0.000 0.000 0.000
## PopulatinRE 0.000 0.000 0.000 0.000 0.000
## PopulatinUM 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinVA 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinYE 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## optimizer (nloptwrap) convergence code: 0 (OK)
## boundary (singular) fit: see ?isSingular
SR_M_lmer_Onder <- lmer(AgeAtDeath_hours ~ -1 + Population + (1|Line:Population) +
(1|Batch) + (1|ReplicateVial : Line : Population), data = (subset(d_SR_M,Supervisor.PI=='Onder')))
capture.output(summary(SR_M_lmer_Onder),file = "Starvation/SR_M_lmer_Onder_sum.txt")
capture.output(anova(SR_M_lmer_Onder),file = "Starvation/SR_M_lmer_Onder.txt")
capture.output(emmeans(SR_M_lmer_Onder, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "Starvation/SR_M_lmer_Onder_tk.txt")
anova(SR_M_lmer_Onder)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 1299875 144431 9 88.625 774.35 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(SR_M_lmer_Onder)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: AgeAtDeath_hours ~ -1 + Population + (1 | Line:Population) +
## (1 | Batch) + (1 | ReplicateVial:Line:Population)
## Data: (subset(d_SR_M, Supervisor.PI == "Onder"))
##
## REML criterion at convergence: 139728.1
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -4.1862 -0.6258 -0.0367 0.5970 5.2151
##
## Random effects:
## Groups Name Variance Std.Dev.
## ReplicateVial:Line:Population (Intercept) 10.5535 3.2486
## Line:Population (Intercept) 95.9375 9.7948
## Batch (Intercept) 0.8965 0.9468
## Residual 186.5178 13.6572
## Number of obs: 17158, groups:
## ReplicateVial:Line:Population, 1732; Line:Population, 168; Batch, 5
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 73.073 2.271 131.418 32.18 <2e-16 ***
## PopulationGI 69.646 2.616 141.305 26.63 <2e-16 ***
## PopulationKA 75.445 2.267 134.598 33.28 <2e-16 ***
## PopulationMA 73.215 2.268 133.692 32.29 <2e-16 ***
## PopulationMU 79.813 2.269 131.295 35.17 <2e-16 ***
## PopulationRE 70.052 2.530 140.185 27.69 <2e-16 ***
## PopulationUM 76.321 2.453 141.600 31.11 <2e-16 ***
## PopulationVA 77.707 2.265 135.176 34.31 <2e-16 ***
## PopulationYE 64.875 2.265 135.195 28.64 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.035
## PopulatinKA 0.033 0.033
## PopulatinMA 0.039 0.034 0.034
## PopulatinMU 0.041 0.034 0.032 0.039
## PopulatinRE 0.037 0.032 0.030 0.036 0.037
## PopulatinUM 0.030 0.029 0.035 0.030 0.029 0.027
## PopulatinVA 0.038 0.033 0.034 0.037 0.038 0.034 0.031
## PopulatinYE 0.038 0.034 0.035 0.037 0.038 0.035 0.032 0.036
p_SR_F_Onder <- ggplot(data = (subset(d_SR_F,Supervisor.PI=='Onder')), aes(x=Population_Lat, y=AgeAtDeath_hours, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_SR_F_Onder", x="Population", y = "AgeAtDeath_hours") + ylim(c(min_SR, max_SR))+ droseu_theme
## quartz_off_screen
## 2
p_SR_F_pop_Onder <- ggplot(data = (subset(d_SR_F,Supervisor.PI=='Onder')), aes(x=Population_Lat, y=AgeAtDeath_hours, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_SR_F_pop_Onder", x="Population", y = "AgeAtDeath_hours") + ylim(c(min_SR, max_SR))+ droseu_theme
## quartz_off_screen
## 2
p_SR_M_Onder <- ggplot(data = (subset(d_SR_M,Supervisor.PI=='Onder')), aes(x=Population_Lat, y=AgeAtDeath_hours, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_SR_M_Onder", x="Population", y = "AgeAtDeath_hours") + ylim(c(min_SR, max_SR))+ droseu_theme
## quartz_off_screen
## 2
p_SR_M_pop_Onder <- ggplot(data = (subset(d_SR_M,Supervisor.PI=='Onder')), aes(x=Population_Lat, y=AgeAtDeath_hours, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_SR_M_pop_Onder", x="Population", y = "AgeAtDeath_hours") + ylim(c(min_SR, max_SR))+ droseu_theme
## quartz_off_screen
## 2
SR_F_lmer_Pasyukova <- lmer(AgeAtDeath_hours ~ -1 + Population + (1|Line:Population) +
(1|Batch) + (1|ReplicateVial : Line : Population), data = (subset(d_SR_F,Supervisor.PI=='Pasyukova')))
## Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
## Model failed to converge with max|grad| = 0.00451614 (tol = 0.002, component 1)
capture.output(summary(SR_F_lmer_Pasyukova),file = "Starvation/SR_F_lmer_Pasyukova_sum.txt")
capture.output(anova(SR_F_lmer_Pasyukova),file = "Starvation/SR_F_lmer_Pasyukova.txt")
capture.output(emmeans(SR_F_lmer_Pasyukova, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "Starvation/SR_F_lmer_Pasyukova_tk.txt")
anova(SR_F_lmer_Pasyukova)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 260966 28996 9 11.49 77.817 5.843e-09 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(SR_F_lmer_Pasyukova)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: AgeAtDeath_hours ~ -1 + Population + (1 | Line:Population) +
## (1 | Batch) + (1 | ReplicateVial:Line:Population)
## Data: (subset(d_SR_F, Supervisor.PI == "Pasyukova"))
##
## REML criterion at convergence: 149510.6
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -5.1750 -0.5760 0.0268 0.6125 3.5353
##
## Random effects:
## Groups Name Variance Std.Dev.
## ReplicateVial:Line:Population (Intercept) 101.25 10.062
## Line:Population (Intercept) 113.33 10.646
## Batch (Intercept) 73.51 8.574
## Residual 372.62 19.303
## Number of obs: 16779, groups:
## ReplicateVial:Line:Population, 1681; Line:Population, 169; Batch, 5
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 103.165 4.621 5.335 22.32 1.78e-06 ***
## PopulationGI 108.267 5.022 7.451 21.56 5.51e-08 ***
## PopulationKA 105.116 4.674 5.597 22.49 1.05e-06 ***
## PopulationMA 101.321 4.683 5.623 21.64 1.25e-06 ***
## PopulationMU 105.822 4.683 5.626 22.59 9.73e-07 ***
## PopulationRE 103.531 4.849 6.462 21.35 3.10e-07 ***
## PopulationUM 103.944 4.759 5.994 21.84 6.08e-07 ***
## PopulationVA 110.685 4.683 5.624 23.64 7.61e-07 ***
## PopulationYE 88.479 4.676 5.606 18.92 2.70e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.668
## PopulatinKA 0.719 0.659
## PopulatinMA 0.719 0.659 0.709
## PopulatinMU 0.719 0.659 0.709 0.710
## PopulatinRE 0.695 0.636 0.685 0.685 0.685
## PopulatinUM 0.708 0.649 0.698 0.698 0.699 0.675
## PopulatinVA 0.719 0.659 0.709 0.710 0.710 0.685 0.698
## PopulatinYE 0.719 0.658 0.708 0.709 0.709 0.685 0.698 0.709
## optimizer (nloptwrap) convergence code: 0 (OK)
## Model failed to converge with max|grad| = 0.00451614 (tol = 0.002, component 1)
SR_M_lmer_Pasyukova <- lmer(AgeAtDeath_hours ~ -1 + Population + (1|Line:Population) +
(1|Batch) + (1|ReplicateVial : Line : Population), data = (subset(d_SR_M,Supervisor.PI=='Pasyukova')))
capture.output(summary(SR_M_lmer_Pasyukova),file = "Starvation/SR_M_lmer_Pasyukova_sum.txt")
capture.output(anova(SR_M_lmer_Pasyukova),file = "Starvation/SR_M_lmer_Pasyukova.txt")
capture.output(emmeans(SR_M_lmer_Pasyukova, list(pairwise ~ Population), adjust = "tukey", mode = "asymp"),file = "Starvation/SR_M_lmer_Pasyukova_tk.txt")
p_SR_F_Pasyukova <- ggplot(data = (subset(d_SR_F,Supervisor.PI=='Pasyukova')), aes(x=Population_Lat, y=AgeAtDeath_hours, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_SR_F_Pasyukova", x="Population", y = "AgeAtDeath_hours") + ylim(c(min_SR, max_SR))+ droseu_theme
## quartz_off_screen
## 2
p_SR_F_pop_Pasyukova <- ggplot(data = (subset(d_SR_F,Supervisor.PI=='Pasyukova')), aes(x=Population_Lat, y=AgeAtDeath_hours, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_SR_F_pop_Pasyukova", x="Population", y = "AgeAtDeath_hours") + ylim(c(min_SR, max_SR))+ droseu_theme
## quartz_off_screen
## 2
p_SR_M_Pasyukova <- ggplot(data = (subset(d_SR_M,Supervisor.PI=='Pasyukova')), aes(x=Population_Lat, y=AgeAtDeath_hours, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_SR_M_Pasyukova", x="Population", y = "AgeAtDeath_hours") + ylim(c(min_SR, max_SR))+ droseu_theme
## quartz_off_screen
## 2
p_SR_M_pop_Pasyukova <- ggplot(data = (subset(d_SR_M,Supervisor.PI=='Pasyukova')), aes(x=Population_Lat, y=AgeAtDeath_hours, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_SR_M_pop_Pasyukova", x="Population", y = "AgeAtDeath_hours") + ylim(c(min_SR, max_SR))+ droseu_theme
## quartz_off_screen
## 2
d_SR_surv <- d_SR %>% mutate(Censor = 1)
SR_F_Gonzalez_survfit <- survfit(Surv(AgeAtDeath_hours) ~ Population, data = filter(d_SR_surv, Supervisor.PI == "Gonzalez", Sex == "F"))
p_SR_F_Gonzalez_survfit <- ggsurvplot(SR_F_Gonzalez_survfit, censor.shape="|", censor.size = 0, pval = FALSE, risk.table = FALSE, conf.int = FALSE, legend.title = "Population", legend.labs = sort(c("YE","RE","GI","MU","MA","UM","KA","VA","AK")), legend = c(0.9, 0.7), title = "p_SR_F_Gonzalez")
p_SR_F_Gonzalez_survfit$plot
pdf(file="Starvation/p_SR_F_Gonzalez_survfit.pdf", width=8, height=5)
p_SR_F_Gonzalez_survfit$plot
invisible(dev.off())
SR_M_Gonzalez_survfit <- survfit(Surv(AgeAtDeath_hours) ~ Population, data = filter(d_SR_surv, Supervisor.PI == "Gonzalez", Sex == "M"))
p_SR_M_Gonzalez_survfit <- ggsurvplot(SR_M_Gonzalez_survfit, censor.shape="|", censor.size = 0, pval = FALSE, risk.table = FALSE, conf.int = FALSE, legend.title = "Population", legend.labs = sort(c("YE","RE","GI","MU","MA","UM","KA","VA","AK")), legend = c(0.9, 0.7), title = "p_SR_M_Gonzalez")
p_SR_M_Gonzalez_survfit$plot
pdf(file="Starvation/p_SR_M_Gonzalez_survfit.pdf", width=8, height=5)
p_SR_M_Gonzalez_survfit$plot
invisible(dev.off())
SR_F_Onder_survfit <- survfit(Surv(AgeAtDeath_hours) ~ Population, data = filter(d_SR_surv, Supervisor.PI == "Onder", Sex == "F"))
p_SR_F_Onder_survfit <- ggsurvplot(SR_F_Onder_survfit, censor.shape="|", censor.size = 0, pval = FALSE, risk.table = FALSE, conf.int = FALSE, legend.title = "Population", legend.labs = sort(c("YE","RE","GI","MU","MA","UM","KA","VA","AK")), legend = c(0.9, 0.7), title = "p_SR_F_Onder")
p_SR_F_Onder_survfit$plot
pdf(file="Starvation/p_SR_F_Onder_survfit.pdf", width=8, height=5)
p_SR_F_Onder_survfit$plot
invisible(dev.off())
SR_M_Onder_survfit <- survfit(Surv(AgeAtDeath_hours) ~ Population, data = filter(d_SR_surv, Supervisor.PI == "Onder", Sex == "M"))
p_SR_M_Onder_survfit <- ggsurvplot(SR_M_Onder_survfit, censor.shape="|", censor.size = 0, pval = FALSE, risk.table = FALSE, conf.int = FALSE, legend.title = "Population", legend.labs = sort(c("YE","RE","GI","MU","MA","UM","KA","VA","AK")), legend = c(0.9, 0.7), title = "p_SR_M_Onder")
p_SR_M_Onder_survfit$plot
pdf(file="Starvation/p_SR_M_Onder_survfit.pdf", width=8, height=5)
p_SR_M_Onder_survfit$plot
invisible(dev.off())
SR_F_Pasyukova_survfit <- survfit(Surv(AgeAtDeath_hours) ~ Population, data = filter(d_SR_surv, Supervisor.PI == "Pasyukova", Sex == "F"))
p_SR_F_Pasyukova_survfit <- ggsurvplot(SR_F_Pasyukova_survfit, censor.shape="|", censor.size = 0, pval = FALSE, risk.table = FALSE, conf.int = FALSE, legend.title = "Population", legend.labs = sort(c("YE","RE","GI","MU","MA","UM","KA","VA","AK")), legend = c(0.9, 0.7), title = "p_SR_F_Pasyukova")
p_SR_F_Pasyukova_survfit$plot
pdf(file="Starvation/p_SR_F_Pasyukova_survfit.pdf", width=8, height=5)
p_SR_F_Pasyukova_survfit$plot
invisible(dev.off())
SR_M_Pasyukova_survfit <- survfit(Surv(AgeAtDeath_hours) ~ Population, data = filter(d_SR_surv, Supervisor.PI == "Pasyukova", Sex == "M"))
p_SR_M_Pasyukova_survfit <- ggsurvplot(SR_M_Pasyukova_survfit, censor.shape="|", censor.size = 0, pval = FALSE, risk.table = FALSE, conf.int = FALSE, legend.title = "Population", legend.labs = sort(c("YE","RE","GI","MU","MA","UM","KA","VA","AK")), legend = c(0.9, 0.7), title = "p_SR_M_Pasyukova")
p_SR_M_Pasyukova_survfit$plot
pdf(file="Starvation/p_SR_M_Pasyukova_survfit.pdf", width=8, height=5)
p_SR_M_Pasyukova_survfit$plot
invisible(dev.off())
SR_F_coxme_Gonzalez <- coxme(Surv(AgeAtDeath_hours, Censor) ~ Population + (1|Batch) + (1|Population/Line) + (1|Population/Line/ReplicateVial), data = filter(d_SR_surv, Supervisor.PI == "Gonzalez", Sex == "F"))
capture.output(summary(SR_F_coxme_Gonzalez), file = "Starvation/SR_F_coxme_Gonzalez_sum.txt")
capture.output(anova(SR_F_coxme_Gonzalez), file = "Starvation/SR_F_coxme_Gonzalez.txt")
SR_M_coxme_Gonzalez <- coxme(Surv(AgeAtDeath_hours, Censor) ~ Population + (1|Batch) + (1|Population/Line) + (1|Population/Line/ReplicateVial), data = filter(d_SR_surv, Supervisor.PI == "Gonzalez", Sex == "M"))
capture.output(summary(SR_M_coxme_Gonzalez), file = "Starvation/SR_M_coxme_Gonzalez_sum.txt")
capture.output(anova(SR_M_coxme_Gonzalez), file = "Starvation/SR_M_coxme_Gonzalez.txt")
SR_F_coxme_Onder <- coxme(Surv(AgeAtDeath_hours, Censor) ~ Population + (1|Batch) + (1|Population/Line) + (1|Population/Line/ReplicateVial), data = filter(d_SR_surv, Supervisor.PI == "Onder", Sex == "F"))
capture.output(summary(SR_F_coxme_Onder), file = "Starvation/SR_F_coxme_Onder_sum.txt")
capture.output(anova(SR_F_coxme_Onder), file = "Starvation/SR_F_coxme_Onder.txt")
SR_M_coxme_Onder <- coxme(Surv(AgeAtDeath_hours, Censor) ~ Population + (1|Batch) + (1|Population/Line) + (1|Population/Line/ReplicateVial), data = filter(d_SR_surv, Supervisor.PI == "Onder", Sex == "M"))
capture.output(summary(SR_M_coxme_Onder), file = "Starvation/SR_M_coxme_Onder_sum.txt")
capture.output(anova(SR_M_coxme_Onder), file = "Starvation/SR_M_coxme_Onder.txt")
SR_F_coxme_Pasyukova <- coxme(Surv(AgeAtDeath_hours, Censor) ~ Population + (1|Batch) + (1|Population/Line) + (1|Population/Line/ReplicateVial), data = filter(d_SR_surv, Supervisor.PI == "Pasyukova", Sex == "F"))
capture.output(summary(SR_F_coxme_Pasyukova), file = "Starvation/SR_F_coxme_Pasyukova_sum.txt")
capture.output(anova(SR_F_coxme_Pasyukova), file = "Starvation/SR_F_coxme_Pasyukova.txt")
SR_M_coxme_Pasyukova <- coxme(Surv(AgeAtDeath_hours, Censor) ~ Population + (1|Batch) + (1|Population/Line) + (1|Population/Line/ReplicateVial), data = filter(d_SR_surv, Supervisor.PI == "Pasyukova", Sex == "M"))
capture.output(summary(SR_M_coxme_Pasyukova), file = "Starvation/SR_M_coxme_Pasyukova_sum.txt")
capture.output(anova(SR_M_coxme_Pasyukova), file = "Starvation/SR_M_coxme_Pasyukova.txt")
intersect_Line_SR <- Reduce(intersect, list(d_SR$Line[d_SR$Supervisor.PI == "Gonzalez"],
d_SR$Line[d_SR$Supervisor.PI == "Pasyukova"],
d_SR$Line[d_SR$Supervisor.PI == "Onder"]))
write(intersect_Line_SR, file ="Starvation/intersect_Line_SR.txt", sep = "\t")
intersect_Pop_SR <- Reduce(intersect, list(d_SR$Population[d_SR$Supervisor.PI == "Gonzalez"],
d_SR$Population[d_SR$Supervisor.PI == "Pasyukova"],
d_SR$Line[d_SR$Supervisor.PI == "Onder"]))
write(intersect_Pop_SR, file ="Starvation/intersect_Pop_SR.txt", sep = "\t")
There are 0 populations and 156 isofemale lines that have been phenotyped across the labs. Please refer to tables named intersect_Trait_level (i.e. intersect_Via_pop) for details.
SR_fitted <- combineFitted(labs = rep(c("Gonzalez", "Onder", "Pasyukova"), 2), sex = rep(c("F", "M"), each = 3), models = list(SR_F_lmer_Gonzalez, SR_F_lmer_Onder, SR_F_lmer_Pasyukova, SR_M_lmer_Gonzalez, SR_M_lmer_Onder, SR_M_lmer_Pasyukova))
p_SR_F_lab_cor <- function() scatterPlotMatrix(SR_fitted, sex = "F")
p_SR_M_lab_cor <- function() scatterPlotMatrix(SR_fitted, sex = "M")
p_SR_F_lab_cor()
p_SR_M_lab_cor()
pdf(file="Starvation/p_SR_F_lab_cor.pdf", width=8, height=8)
p_SR_F_lab_cor()
invisible(dev.off())
pdf(file="Starvation/p_SR_M_lab_cor.pdf", width=8, height=8)
p_SR_M_lab_cor()
invisible(dev.off())
dir.create(file.path("Pigmentation"), showWarnings = FALSE)
For a detailed description of tables, plots, linear models and outputs, please refer here
Abbott Lab : Jessica Abbott, Qinyang Li, Shahzad Khan
Gibert Lab :Cristina Vieira, Laurence Mouton, Natacha Kremer, Sonia Martinez, Camille Mermet, Patricia Gibert
Schmidt Lab : Amy Goldfischer, Paul Schmidt
d_Pgm <- read.csv("MasterSheets_Oct21_git/PGM_MasterSheet_Jan22.csv")
str(d_Pgm)
## 'data.frame': 3694 obs. of 17 variables:
## $ Supervisor.PI: chr "Gibert" "Gibert" "Gibert" "Gibert" ...
## $ Diet : chr "NS" "NS" "NS" "NS" ...
## $ Batch : int 1 1 1 1 1 1 1 1 1 1 ...
## $ Population : chr "AK" "AK" "AK" "AK" ...
## $ Line : chr "AK1" "AK1" "AK1" "AK1" ...
## $ Sex : logi FALSE FALSE FALSE FALSE FALSE FALSE ...
## $ Individual : int 1 2 3 4 5 6 7 8 9 1 ...
## $ AreaT4 : int 12439 10230 7525 14898 9160 8279 13100 9016 7776 9595 ...
## $ AreaT5 : int 10410 8105 7358 7682 8931 8518 16468 10331 7527 8454 ...
## $ AreaT6 : int 8667 6063 6732 5718 8630 10349 11798 7986 5248 8749 ...
## $ PercT4 : num 13.6 28.1 41.4 25.4 17.3 ...
## $ PercT5 : num 27.8 45.8 62.7 37.4 32.8 ...
## $ PercT6 : num 53.9 71 78 44.8 40 ...
## $ TotalArea : int 31516 24398 21615 28298 26721 27146 41366 27333 20551 26798 ...
## $ TotalBlack : num 9270 10900 12986 9220 7966 ...
## $ TotalPerc : num 29.4 44.7 60.1 32.6 29.8 ...
## $ Orientation : chr "OK" "OK" "OK" "OK" ...
d_Pgm$Supervisor.PI <- as.factor(d_Pgm$Supervisor.PI)
d_Pgm$Diet <- as.factor(d_Pgm$Diet)
d_Pgm$Batch <- as.factor(d_Pgm$Batch)
d_Pgm$Population_Lat <- factor(d_Pgm$Population, levels= c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))
d_Pgm$Population_Lon <- factor(d_Pgm$Population, levels= c("RE","GI","KA","MU","MA","AK","UM","YE","VA"))
d_Pgm$Population_Alt <- factor(d_Pgm$Population, levels= c("KA","AK","GI","RE","UM","VA","MU","MA","YE"))
d_Pgm$Line <- as.factor(d_Pgm$Line)
d_Pgm$AreaT4 <- as.numeric(d_Pgm$AreaT4)
d_Pgm$AreaT5 <- as.numeric(d_Pgm$AreaT5)
d_Pgm$AreaT6 <- as.numeric(d_Pgm$AreaT6)
d_Pgm$PercT4 <- as.numeric(d_Pgm$PercT4)
d_Pgm$PercT5 <- as.numeric(d_Pgm$PercT5)
d_Pgm$PercT6 <- as.numeric(d_Pgm$PercT6)
d_Pgm$TotalArea <- as.numeric(d_Pgm$TotalArea)
d_Pgm$TotalBlack <- as.numeric(d_Pgm$TotalBlack)
str(d_Pgm)
## 'data.frame': 3694 obs. of 20 variables:
## $ Supervisor.PI : Factor w/ 2 levels "Abbott","Gibert": 2 2 2 2 2 2 2 2 2 2 ...
## $ Diet : Factor w/ 1 level "NS": 1 1 1 1 1 1 1 1 1 1 ...
## $ Batch : Factor w/ 3 levels "1","2","3": 1 1 1 1 1 1 1 1 1 1 ...
## $ Population : chr "AK" "AK" "AK" "AK" ...
## $ Line : Factor w/ 168 levels "AK1","AK10","AK11",..: 1 1 1 1 1 1 1 1 1 11 ...
## $ Sex : logi FALSE FALSE FALSE FALSE FALSE FALSE ...
## $ Individual : int 1 2 3 4 5 6 7 8 9 1 ...
## $ AreaT4 : num 12439 10230 7525 14898 9160 ...
## $ AreaT5 : num 10410 8105 7358 7682 8931 ...
## $ AreaT6 : num 8667 6063 6732 5718 8630 ...
## $ PercT4 : num 13.6 28.1 41.4 25.4 17.3 ...
## $ PercT5 : num 27.8 45.8 62.7 37.4 32.8 ...
## $ PercT6 : num 53.9 71 78 44.8 40 ...
## $ TotalArea : num 31516 24398 21615 28298 26721 ...
## $ TotalBlack : num 9270 10900 12986 9220 7966 ...
## $ TotalPerc : num 29.4 44.7 60.1 32.6 29.8 ...
## $ Orientation : chr "OK" "OK" "OK" "OK" ...
## $ Population_Lat: Factor w/ 9 levels "YE","RE","GI",..: 9 9 9 9 9 9 9 9 9 9 ...
## $ Population_Lon: Factor w/ 9 levels "RE","GI","KA",..: 6 6 6 6 6 6 6 6 6 6 ...
## $ Population_Alt: Factor w/ 9 levels "KA","AK","GI",..: 2 2 2 2 2 2 2 2 2 2 ...
d_Pgm2 <- read.csv("MasterSheets_Oct21_git/PGM2_MasterSheet_Oct21.csv")
str(d_Pgm2)
## 'data.frame': 1514 obs. of 15 variables:
## $ Supervisor.PI: chr "Schmidt" "Schmidt" "Schmidt" "Schmidt" ...
## $ Diet : chr "NS" "NS" "NS" "NS" ...
## $ Batch : int 1 1 1 1 1 1 1 1 1 1 ...
## $ Population : chr "AK" "AK" "AK" "AK" ...
## $ Line : chr "AK1" "AK1" "AK1" "AK1" ...
## $ Sex : logi FALSE FALSE FALSE FALSE FALSE FALSE ...
## $ Individual : int 2 9 1 10 3 6 8 5 4 7 ...
## $ Tergite8 : int 4 3 2 2 2 2 2 1 1 1 ...
## $ Tergite9 : int 8 7 6 5 4 4 4 3 2 1 ...
## $ Tergite10 : int 6 3 3 4 1 1 1 1 0 0 ...
## $ Total : int 18 13 11 11 7 7 7 5 3 2 ...
## $ Country : chr "Finland" "Finland" "Finland" "Finland" ...
## $ Latitude : num 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 ...
## $ Longitude : num 23.5 23.5 23.5 23.5 23.5 ...
## $ Altitude : int 88 88 88 88 88 88 88 88 88 88 ...
d_Pgm2$Supervisor.PI <- as.factor(d_Pgm2$Supervisor.PI)
d_Pgm2$Diet <- as.factor(d_Pgm2$Diet)
d_Pgm2$Batch <- as.factor(d_Pgm2$Batch)
d_Pgm2$Population_Lat <- factor(d_Pgm2$Population, levels= c("YE","RE","GI","MU","MA","UM","KA","VA","AK"))
d_Pgm2$Population_Lon <- factor(d_Pgm2$Population, levels= c("RE","GI","KA","MU","MA","AK","UM","YE","VA"))
d_Pgm2$Population_Alt <- factor(d_Pgm2$Population, levels= c("KA","AK","GI","RE","UM","VA","MU","MA","YE"))
d_Pgm2$Line <- as.factor(d_Pgm2$Line)
d_Pgm2$Tergite8 <- as.numeric(d_Pgm2$Tergite8)
d_Pgm2$Tergite9 <- as.numeric(d_Pgm2$Tergite9)
d_Pgm2$Tergite10 <- as.numeric(d_Pgm2$Tergite10)
d_Pgm2$Total <- as.numeric(d_Pgm2$Total)
str(d_Pgm2)
## 'data.frame': 1514 obs. of 18 variables:
## $ Supervisor.PI : Factor w/ 1 level "Schmidt": 1 1 1 1 1 1 1 1 1 1 ...
## $ Diet : Factor w/ 1 level "NS": 1 1 1 1 1 1 1 1 1 1 ...
## $ Batch : Factor w/ 1 level "1": 1 1 1 1 1 1 1 1 1 1 ...
## $ Population : chr "AK" "AK" "AK" "AK" ...
## $ Line : Factor w/ 157 levels "AK1","AK10","AK11",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Sex : logi FALSE FALSE FALSE FALSE FALSE FALSE ...
## $ Individual : int 2 9 1 10 3 6 8 5 4 7 ...
## $ Tergite8 : num 4 3 2 2 2 2 2 1 1 1 ...
## $ Tergite9 : num 8 7 6 5 4 4 4 3 2 1 ...
## $ Tergite10 : num 6 3 3 4 1 1 1 1 0 0 ...
## $ Total : num 18 13 11 11 7 7 7 5 3 2 ...
## $ Country : chr "Finland" "Finland" "Finland" "Finland" ...
## $ Latitude : num 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 61.1 ...
## $ Longitude : num 23.5 23.5 23.5 23.5 23.5 ...
## $ Altitude : int 88 88 88 88 88 88 88 88 88 88 ...
## $ Population_Lat: Factor w/ 9 levels "YE","RE","GI",..: 9 9 9 9 9 9 9 9 9 9 ...
## $ Population_Lon: Factor w/ 9 levels "RE","GI","KA",..: 6 6 6 6 6 6 6 6 6 6 ...
## $ Population_Alt: Factor w/ 9 levels "KA","AK","GI",..: 2 2 2 2 2 2 2 2 2 2 ...
Descriptive statistics at the line level, with batch information :
table_Pgm_Line_PercT4_wbatch <- write.csv(d_Pgm %>% group_by(Supervisor.PI, Batch, Population, Line) %>% summarise_at(vars(PercT4), list(Mean = mean, SD= sd, Median = median, Min = min, Max = max, SE = std_err, CV = coef_var, Mode = estimate_mode)), file = "Pigmentation/table_Pgm_Line_PercT4_wbatch.csv", row.names = T)
table_Pgm_Line_PercT4_wbatch <- read.csv("Pigmentation/table_Pgm_Line_PercT4_wbatch.csv")
DT::datatable(table_Pgm_Line_PercT4_wbatch, options = list(pageLength = 10)) %>% formatRound(6:13, 3)
Descriptive statistics at the line level, without batch information :
table_Pgm_Line_PercT4_wobatch <- write.csv(d_Pgm %>% group_by(Supervisor.PI, Population, Line) %>% summarise_at(vars(PercT4), list(Mean = mean, SD= sd, Median = median, Min = min, Max = max, SE = std_err, CV = coef_var, Mode = estimate_mode)), file = "Pigmentation/table_Pgm_Line_PercT4_wobatch.csv", row.names = T)
table_Pgm_Line_PercT4_wobatch <- read.csv("Pigmentation/table_Pgm_Line_PercT4_wobatch.csv")
DT::datatable(table_Pgm_Line_PercT4_wobatch, options = list(pageLength = 10)) %>% formatRound(5:12, 3)
Descriptive statistics at the population level, with batch information :
table_Pgm_Pop_PercT4_wbatch <- write.csv(d_Pgm %>% group_by(Supervisor.PI, Batch, Population) %>%
summarise_at(vars(PercT4),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "Pigmentation/table_Pgm_Pop_PercT4_wbatch.csv", row.names = T)
table_Pgm_Pop_PercT4_wbatch <- read.csv("Pigmentation/table_Pgm_Pop_PercT4_wbatch.csv")
DT::datatable(table_Pgm_Pop_PercT4_wbatch, options = list(pageLength = 10)) %>% formatRound(5:12, 3)
Descriptive statistics at the population level, without batch information :
table_Pgm_Pop_PercT4_wobatch <- write.csv(d_Pgm %>% group_by(Supervisor.PI, Population) %>%
summarise_at(vars(PercT4),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "Pigmentation/table_Pgm_Pop_PercT4_wobatch.csv", row.names = T)
table_Pgm_Pop_PercT4_wobatch <- read.csv("Pigmentation/table_Pgm_Pop_PercT4_wobatch.csv")
DT::datatable(table_Pgm_Pop_PercT4_wobatch, options = list(pageLength = 10))%>% formatRound(4:11, 3)
Descriptive statistics at the line level, with batch information :
table_Pgm_Line_PercT5_wbatch <- write.csv(d_Pgm %>% group_by(Supervisor.PI, Batch, Population, Line) %>% summarise_at(vars(PercT5), list(Mean = mean, SD= sd, Median = median, Min = min, Max = max, SE = std_err, CV = coef_var, Mode = estimate_mode)), file = "Pigmentation/table_Pgm_Line_PercT5_wbatch.csv", row.names = T)
table_Pgm_Line_PercT5_wbatch <- read.csv("Pigmentation/table_Pgm_Line_PercT5_wbatch.csv")
DT::datatable(table_Pgm_Line_PercT5_wbatch, options = list(pageLength = 10)) %>% formatRound(6:13, 3)
Descriptive statistics at the line level, without batch information :
table_Pgm_Line_PercT5_wobatch <- write.csv(d_Pgm %>% group_by(Supervisor.PI, Population, Line) %>% summarise_at(vars(PercT5), list(Mean = mean, SD= sd, Median = median, Min = min, Max = max, SE = std_err, CV = coef_var, Mode = estimate_mode)), file = "Pigmentation/table_Pgm_Line_PercT5_wobatch.csv", row.names = T)
table_Pgm_Line_PercT5_wobatch <- read.csv("Pigmentation/table_Pgm_Line_PercT5_wobatch.csv")
DT::datatable(table_Pgm_Line_PercT5_wobatch, options = list(pageLength = 10)) %>% formatRound(5:12, 3)
Descriptive statistics at the population level, with batch information :
table_Pgm_Pop_PercT5_wbatch <- write.csv(d_Pgm %>% group_by(Supervisor.PI, Batch, Population) %>%
summarise_at(vars(PercT5),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "Pigmentation/table_Pgm_Pop_PercT5_wbatch.csv", row.names = T)
table_Pgm_Pop_PercT5_wbatch <- read.csv("Pigmentation/table_Pgm_Pop_PercT5_wbatch.csv")
DT::datatable(table_Pgm_Pop_PercT5_wbatch, options = list(pageLength = 10)) %>% formatRound(5:12, 3)
Descriptive statistics at the population level, without batch information :
table_Pgm_Pop_PercT5_wobatch <- write.csv(d_Pgm %>% group_by(Supervisor.PI, Population) %>%
summarise_at(vars(PercT5),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "Pigmentation/table_Pgm_Pop_PercT5_wobatch.csv", row.names = T)
table_Pgm_Pop_PercT5_wobatch <- read.csv("Pigmentation/table_Pgm_Pop_PercT5_wobatch.csv")
DT::datatable(table_Pgm_Pop_PercT5_wobatch, options = list(pageLength = 10))%>% formatRound(4:11, 3)
Descriptive statistics at the line level, with batch information :
table_Pgm_Line_PercT6_wbatch <- write.csv(d_Pgm %>% group_by(Supervisor.PI, Batch, Population, Line) %>% summarise_at(vars(PercT6), list(Mean = mean, SD= sd, Median = median, Min = min, Max = max, SE = std_err, CV = coef_var, Mode = estimate_mode)), file = "Pigmentation/table_Pgm_Line_PercT6_wbatch.csv", row.names = T)
table_Pgm_Line_PercT6_wbatch <- read.csv("Pigmentation/table_Pgm_Line_PercT6_wbatch.csv")
DT::datatable(table_Pgm_Line_PercT6_wbatch, options = list(pageLength = 10)) %>% formatRound(6:13, 3)
Descriptive statistics at the line level, without batch information :
table_Pgm_Line_PercT6_wobatch <- write.csv(d_Pgm %>% group_by(Supervisor.PI, Population, Line) %>% summarise_at(vars(PercT6), list(Mean = mean, SD= sd, Median = median, Min = min, Max = max, SE = std_err, CV = coef_var, Mode = estimate_mode)), file = "Pigmentation/table_Pgm_Line_PercT6_wobatch.csv", row.names = T)
table_Pgm_Line_PercT6_wobatch <- read.csv("Pigmentation/table_Pgm_Line_PercT6_wobatch.csv")
DT::datatable(table_Pgm_Line_PercT6_wobatch, options = list(pageLength = 10)) %>% formatRound(5:12, 3)
Descriptive statistics at the population level, with batch information :
table_Pgm_Pop_PercT6_wbatch <- write.csv(d_Pgm %>% group_by(Supervisor.PI, Batch, Population) %>%
summarise_at(vars(PercT6),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "Pigmentation/table_Pgm_Pop_PercT6_wbatch.csv", row.names = T)
table_Pgm_Pop_PercT6_wbatch <- read.csv("Pigmentation/table_Pgm_Pop_PercT6_wbatch.csv")
DT::datatable(table_Pgm_Pop_PercT6_wbatch, options = list(pageLength = 10)) %>% formatRound(5:12, 3)
Descriptive statistics at the population level, without batch information :
table_Pgm_Pop_PercT6_wobatch <- write.csv(d_Pgm %>% group_by(Supervisor.PI, Population) %>%
summarise_at(vars(PercT6),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "Pigmentation/table_Pgm_Pop_PercT6_wobatch.csv", row.names = T)
table_Pgm_Pop_PercT6_wobatch <- read.csv("Pigmentation/table_Pgm_Pop_PercT6_wobatch.csv")
DT::datatable(table_Pgm_Pop_PercT6_wobatch, options = list(pageLength = 10))%>% formatRound(4:11, 3)
Descriptive statistics at the line level, with batch information :
table_Pgm_Line_TotalPerc_wbatch <- write.csv(d_Pgm %>% group_by(Supervisor.PI, Batch, Population, Line) %>% summarise_at(vars(TotalPerc), list(Mean = mean, SD= sd, Median = median, Min = min, Max = max, SE = std_err, CV = coef_var, Mode = estimate_mode)), file = "Pigmentation/table_Pgm_Line_TotalPerc_wbatch.csv", row.names = T)
table_Pgm_Line_TotalPerc_wbatch <- read.csv("Pigmentation/table_Pgm_Line_TotalPerc_wbatch.csv")
DT::datatable(table_Pgm_Line_TotalPerc_wbatch, options = list(pageLength = 10)) %>% formatRound(6:13, 3)
Descriptive statistics at the line level, without batch information :
table_Pgm_Line_TotalPerc_wobatch <- write.csv(d_Pgm %>% group_by(Supervisor.PI, Population, Line) %>% summarise_at(vars(TotalPerc), list(Mean = mean, SD= sd, Median = median, Min = min, Max = max, SE = std_err, CV = coef_var, Mode = estimate_mode)), file = "Pigmentation/table_Pgm_Line_TotalPerc_wobatch.csv", row.names = T)
table_Pgm_Line_TotalPerc_wobatch <- read.csv("Pigmentation/table_Pgm_Line_TotalPerc_wobatch.csv")
DT::datatable(table_Pgm_Line_TotalPerc_wobatch, options = list(pageLength = 10)) %>% formatRound(5:12, 3)
Descriptive statistics at the population level, with batch information :
table_Pgm_Pop_TotalPerc_wbatch <- write.csv(d_Pgm %>% group_by(Supervisor.PI, Batch, Population) %>%
summarise_at(vars(TotalPerc),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "Pigmentation/table_Pgm_Pop_TotalPerc_wbatch.csv", row.names = T)
table_Pgm_Pop_TotalPerc_wbatch <- read.csv("Pigmentation/table_Pgm_Pop_TotalPerc_wbatch.csv")
DT::datatable(table_Pgm_Pop_TotalPerc_wbatch, options = list(pageLength = 10)) %>% formatRound(5:12, 3)
Descriptive statistics at the population level, without batch information :
table_Pgm_Pop_TotalPerc_wobatch <- write.csv(d_Pgm %>% group_by(Supervisor.PI, Population) %>%
summarise_at(vars(TotalPerc),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "Pigmentation/table_Pgm_Pop_TotalPerc_wobatch.csv", row.names = T)
table_Pgm_Pop_TotalPerc_wobatch <- read.csv("Pigmentation/table_Pgm_Pop_TotalPerc_wobatch.csv")
DT::datatable(table_Pgm_Pop_TotalPerc_wobatch, options = list(pageLength = 10))%>% formatRound(4:11, 3)
Descriptive statistics at the line level, with batch information :
table_Pgm_Line_Tergite8_wbatch <- write.csv(d_Pgm2 %>% group_by(Supervisor.PI, Batch, Population, Line) %>% summarise_at(vars(Tergite8), list(Mean = mean, SD= sd, Median = median, Min = min, Max = max, SE = std_err, CV = coef_var, Mode = estimate_mode)), file = "Pigmentation/table_Pgm_Line_Tergite8_wbatch.csv", row.names = T)
table_Pgm_Line_Tergite8_wbatch <- read.csv("Pigmentation/table_Pgm_Line_Tergite8_wbatch.csv")
DT::datatable(table_Pgm_Line_Tergite8_wbatch, options = list(pageLength = 10)) %>% formatRound(6:13, 3)
Descriptive statistics at the line level, without batch information :
table_Pgm_Line_Tergite8_wobatch <- write.csv(d_Pgm2 %>% group_by(Supervisor.PI, Population, Line) %>% summarise_at(vars(Tergite8), list(Mean = mean, SD= sd, Median = median, Min = min, Max = max, SE = std_err, CV = coef_var, Mode = estimate_mode)), file = "Pigmentation/table_Pgm_Line_Tergite8_wobatch.csv", row.names = T)
table_Pgm_Line_Tergite8_wobatch <- read.csv("Pigmentation/table_Pgm_Line_Tergite8_wobatch.csv")
DT::datatable(table_Pgm_Line_Tergite8_wobatch, options = list(pageLength = 10)) %>% formatRound(5:12, 3)
Descriptive statistics at the population level, with batch information :
table_Pgm_Pop_Tergite8_wbatch <- write.csv(d_Pgm2 %>% group_by(Supervisor.PI, Batch, Population) %>%
summarise_at(vars(Tergite8),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "Pigmentation/table_Pgm_Pop_Tergite8_wbatch.csv", row.names = T)
table_Pgm_Pop_Tergite8_wbatch <- read.csv("Pigmentation/table_Pgm_Pop_Tergite8_wbatch.csv")
DT::datatable(table_Pgm_Pop_Tergite8_wbatch, options = list(pageLength = 10)) %>% formatRound(5:12, 3)
Descriptive statistics at the population level, without batch information :
table_Pgm_Pop_Tergite8_wobatch <- write.csv(d_Pgm2 %>% group_by(Supervisor.PI, Population) %>%
summarise_at(vars(Tergite8),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "Pigmentation/table_Pgm_Pop_Tergite8_wobatch.csv", row.names = T)
table_Pgm_Pop_Tergite8_wobatch <- read.csv("Pigmentation/table_Pgm_Pop_Tergite8_wobatch.csv")
DT::datatable(table_Pgm_Pop_Tergite8_wobatch, options = list(pageLength = 10))%>% formatRound(4:11, 3)
Descriptive statistics at the line level, with batch information :
table_Pgm_Line_Tergite9_wbatch <- write.csv(d_Pgm2 %>% group_by(Supervisor.PI, Batch, Population, Line) %>% summarise_at(vars(Tergite9), list(Mean = mean, SD= sd, Median = median, Min = min, Max = max, SE = std_err, CV = coef_var, Mode = estimate_mode)), file = "Pigmentation/table_Pgm_Line_Tergite9_wbatch.csv", row.names = T)
table_Pgm_Line_Tergite9_wbatch <- read.csv("Pigmentation/table_Pgm_Line_Tergite9_wbatch.csv")
DT::datatable(table_Pgm_Line_Tergite9_wbatch, options = list(pageLength = 10)) %>% formatRound(6:13, 3)
Descriptive statistics at the line level, without batch information :
table_Pgm_Line_Tergite9_wobatch <- write.csv(d_Pgm2 %>% group_by(Supervisor.PI, Population, Line) %>% summarise_at(vars(Tergite9), list(Mean = mean, SD= sd, Median = median, Min = min, Max = max, SE = std_err, CV = coef_var, Mode = estimate_mode)), file = "Pigmentation/table_Pgm_Line_Tergite9_wobatch.csv", row.names = T)
table_Pgm_Line_Tergite9_wobatch <- read.csv("Pigmentation/table_Pgm_Line_Tergite9_wobatch.csv")
DT::datatable(table_Pgm_Line_Tergite9_wobatch, options = list(pageLength = 10)) %>% formatRound(5:12, 3)
Descriptive statistics at the population level, with batch information :
table_Pgm_Pop_Tergite9_wbatch <- write.csv(d_Pgm2 %>% group_by(Supervisor.PI, Batch, Population) %>%
summarise_at(vars(Tergite9),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "Pigmentation/table_Pgm_Pop_Tergite9_wbatch.csv", row.names = T)
table_Pgm_Pop_Tergite9_wbatch <- read.csv("Pigmentation/table_Pgm_Pop_Tergite9_wbatch.csv")
DT::datatable(table_Pgm_Pop_Tergite9_wbatch, options = list(pageLength = 10)) %>% formatRound(5:12, 3)
Descriptive statistics at the population level, without batch information :
table_Pgm_Pop_Tergite9_wobatch <- write.csv(d_Pgm2 %>% group_by(Supervisor.PI, Population) %>%
summarise_at(vars(Tergite9),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "Pigmentation/table_Pgm_Pop_Tergite9_wobatch.csv", row.names = T)
table_Pgm_Pop_Tergite9_wobatch <- read.csv("Pigmentation/table_Pgm_Pop_Tergite9_wobatch.csv")
DT::datatable(table_Pgm_Pop_Tergite9_wobatch, options = list(pageLength = 10))%>% formatRound(4:11, 3)
Descriptive statistics at the line level, with batch information :
table_Pgm_Line_Tergite10_wbatch <- write.csv(d_Pgm2 %>% group_by(Supervisor.PI, Batch, Population, Line) %>% summarise_at(vars(Tergite10), list(Mean = mean, SD= sd, Median = median, Min = min, Max = max, SE = std_err, CV = coef_var, Mode = estimate_mode)), file = "Pigmentation/table_Pgm_Line_Tergite10_wbatch.csv", row.names = T)
table_Pgm_Line_Tergite10_wbatch <- read.csv("Pigmentation/table_Pgm_Line_Tergite10_wbatch.csv")
DT::datatable(table_Pgm_Line_Tergite10_wbatch, options = list(pageLength = 10)) %>% formatRound(6:13, 3)
Descriptive statistics at the line level, without batch information :
table_Pgm_Line_Tergite10_wobatch <- write.csv(d_Pgm2 %>% group_by(Supervisor.PI, Population, Line) %>% summarise_at(vars(Tergite10), list(Mean = mean, SD= sd, Median = median, Min = min, Max = max, SE = std_err, CV = coef_var, Mode = estimate_mode)), file = "Pigmentation/table_Pgm_Line_Tergite10_wobatch.csv", row.names = T)
table_Pgm_Line_Tergite10_wobatch <- read.csv("Pigmentation/table_Pgm_Line_Tergite10_wobatch.csv")
DT::datatable(table_Pgm_Line_Tergite10_wobatch, options = list(pageLength = 10)) %>% formatRound(5:12, 3)
Descriptive statistics at the population level, with batch information :
table_Pgm_Pop_Tergite10_wbatch <- write.csv(d_Pgm2 %>% group_by(Supervisor.PI, Batch, Population) %>%
summarise_at(vars(Tergite10),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "Pigmentation/table_Pgm_Pop_Tergite10_wbatch.csv", row.names = T)
table_Pgm_Pop_Tergite10_wbatch <- read.csv("Pigmentation/table_Pgm_Pop_Tergite10_wbatch.csv")
DT::datatable(table_Pgm_Pop_Tergite10_wbatch, options = list(pageLength = 10)) %>% formatRound(5:12, 3)
Descriptive statistics at the population level, without batch information :
table_Pgm_Pop_Tergite10_wobatch <- write.csv(d_Pgm2 %>% group_by(Supervisor.PI, Population) %>%
summarise_at(vars(Tergite10),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "Pigmentation/table_Pgm_Pop_Tergite10_wobatch.csv", row.names = T)
table_Pgm_Pop_Tergite10_wobatch <- read.csv("Pigmentation/table_Pgm_Pop_Tergite10_wobatch.csv")
DT::datatable(table_Pgm_Pop_Tergite10_wobatch, options = list(pageLength = 10))%>% formatRound(4:11, 3)
Descriptive statistics at the line level, with batch information :
table_Pgm_Line_Total_wbatch <- write.csv(d_Pgm2 %>% group_by(Supervisor.PI, Batch, Population, Line) %>% summarise_at(vars(Total), list(Mean = mean, SD= sd, Median = median, Min = min, Max = max, SE = std_err, CV = coef_var, Mode = estimate_mode)), file = "Pigmentation/table_Pgm_Line_Total_wbatch.csv", row.names = T)
table_Pgm_Line_Total_wbatch <- read.csv("Pigmentation/table_Pgm_Line_Total_wbatch.csv")
DT::datatable(table_Pgm_Line_Total_wbatch, options = list(pageLength = 10)) %>% formatRound(6:13, 3)
Descriptive statistics at the line level, without batch information :
table_Pgm_Line_Total_wobatch <- write.csv(d_Pgm2 %>% group_by(Supervisor.PI, Population, Line) %>% summarise_at(vars(Total), list(Mean = mean, SD= sd, Median = median, Min = min, Max = max, SE = std_err, CV = coef_var, Mode = estimate_mode)), file = "Pigmentation/table_Pgm_Line_Total_wobatch.csv", row.names = T)
table_Pgm_Line_Total_wobatch <- read.csv("Pigmentation/table_Pgm_Line_Total_wobatch.csv")
DT::datatable(table_Pgm_Line_Total_wobatch, options = list(pageLength = 10)) %>% formatRound(5:12, 3)
Descriptive statistics at the population level, with batch information :
table_Pgm_Pop_Total_wbatch <- write.csv(d_Pgm2 %>% group_by(Supervisor.PI, Batch, Population) %>%
summarise_at(vars(Total),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "Pigmentation/table_Pgm_Pop_Total_wbatch.csv", row.names = T)
table_Pgm_Pop_Total_wbatch <- read.csv("Pigmentation/table_Pgm_Pop_Total_wbatch.csv")
DT::datatable(table_Pgm_Pop_Total_wbatch, options = list(pageLength = 10)) %>% formatRound(5:12, 3)
Descriptive statistics at the population level, without batch information :
table_Pgm_Pop_Total_wobatch <- write.csv(d_Pgm2 %>% group_by(Supervisor.PI, Population) %>%
summarise_at(vars(Total),
list(Mean = mean, SD= sd, Median = median, Min = min, Max = max,
SE = std_err, CV = coef_var, Mode = estimate_mode)),
file = "Pigmentation/table_Pgm_Pop_Total_wobatch.csv", row.names = T)
table_Pgm_Pop_Total_wobatch <- read.csv("Pigmentation/table_Pgm_Pop_Total_wobatch.csv")
DT::datatable(table_Pgm_Pop_Total_wobatch, options = list(pageLength = 10))%>% formatRound(4:11, 3)
PercT4
Pgm_lmer_Abbott_PercT4 <- lmer(PercT4 ~ -1 + Population + (1|Line:Population),
data = (subset(d_Pgm,Supervisor.PI=='Abbott')))
capture.output(summary(Pgm_lmer_Abbott_PercT4),file = "Pigmentation/Pgm_lmer_Abbott_PercT4_sum.txt")
capture.output(anova(Pgm_lmer_Abbott_PercT4),file = "Pigmentation/Pgm_lmer_Abbott_PercT4.txt")
anova(Pgm_lmer_Abbott_PercT4)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 57862 6429.1 9 151.93 208.03 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(Pgm_lmer_Abbott_PercT4)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PercT4 ~ -1 + Population + (1 | Line:Population)
## Data: (subset(d_Pgm, Supervisor.PI == "Abbott"))
##
## REML criterion at convergence: 12537.3
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.1997 -0.5926 -0.1274 0.4734 7.9312
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 16.14 4.018
## Residual 30.91 5.559
## Number of obs: 1953, groups: Line:Population, 161
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 14.2768 0.9638 149.7585 14.813 < 2e-16 ***
## PopulationGI 13.2016 1.1577 152.7995 11.403 < 2e-16 ***
## PopulationKA 10.1518 0.9932 152.5033 10.221 < 2e-16 ***
## PopulationMA 21.6093 1.0211 152.8771 21.162 < 2e-16 ***
## PopulationMU 15.2126 1.0484 151.5568 14.510 < 2e-16 ***
## PopulationRE 17.3464 1.0829 152.7637 16.018 < 2e-16 ***
## PopulationUM 14.6774 1.0192 151.7714 14.400 < 2e-16 ***
## PopulationVA 7.5382 0.9901 150.5722 7.614 2.72e-12 ***
## PopulationYE 14.9440 0.9687 152.8572 15.428 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.000
## PopulatinKA 0.000 0.000
## PopulatinMA 0.000 0.000 0.000
## PopulatinMU 0.000 0.000 0.000 0.000
## PopulatinRE 0.000 0.000 0.000 0.000 0.000
## PopulatinUM 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinVA 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinYE 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
p_Pgm_Abbott_PercT4 <- ggplot(data = (subset(d_Pgm,Supervisor.PI=='Abbott')), aes(x=Population_Lat, y=PercT4, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_Pgm_Abbott_PercT4", x="Population", y = "PercT4") + ylim(c(min(d_Pgm$PercT4) , max(d_Pgm$PercT4)))+ droseu_theme
## quartz_off_screen
## 2
p_Pgm_pop_Abbott_PercT4 <- ggplot(data = (subset(d_Pgm,Supervisor.PI=='Abbott')), aes(x=Population_Lat, y=PercT4, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_Pgm_pop_Abbott_PercT4", x="Population", y = "PercT4") + ylim(c(min(d_Pgm$PercT4) , max(d_Pgm$PercT4)))+ droseu_theme
## quartz_off_screen
## 2
PercT5
Pgm_lmer_Abbott_PercT5 <- lmer(PercT5 ~ -1 + Population + (1|Line:Population) , data = (subset(d_Pgm,Supervisor.PI=='Abbott')))
capture.output(summary(Pgm_lmer_Abbott_PercT5),file = "Pigmentation/Pgm_lmer_Abbott_PercT5_sum.txt")
capture.output(anova(Pgm_lmer_Abbott_PercT5),file = "Pigmentation/Pgm_lmer_Abbott_PercT5.txt")
anova(Pgm_lmer_Abbott_PercT5)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 88573 9841.4 9 151.24 284.41 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(Pgm_lmer_Abbott_PercT5)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PercT5 ~ -1 + Population + (1 | Line:Population)
## Data: (subset(d_Pgm, Supervisor.PI == "Abbott"))
##
## REML criterion at convergence: 12736.6
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.1419 -0.6487 -0.1115 0.5154 6.4092
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 15.44 3.929
## Residual 34.60 5.882
## Number of obs: 1953, groups: Line:Population, 161
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 17.7494 0.9531 148.7407 18.62 <2e-16 ***
## PopulationGI 15.8249 1.1456 152.2199 13.81 <2e-16 ***
## PopulationKA 12.6107 0.9828 151.8949 12.83 <2e-16 ***
## PopulationMA 23.6705 1.0105 152.3113 23.43 <2e-16 ***
## PopulationMU 17.3056 1.0372 150.8151 16.68 <2e-16 ***
## PopulationRE 18.4126 1.0716 152.1776 17.18 <2e-16 ***
## PopulationUM 17.7191 1.0084 151.0598 17.57 <2e-16 ***
## PopulationVA 10.4377 0.9792 149.6941 10.66 <2e-16 ***
## PopulationYE 16.9507 0.9586 152.2972 17.68 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.000
## PopulatinKA 0.000 0.000
## PopulatinMA 0.000 0.000 0.000
## PopulatinMU 0.000 0.000 0.000 0.000
## PopulatinRE 0.000 0.000 0.000 0.000 0.000
## PopulatinUM 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinVA 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinYE 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
p_Pgm_Abbott_PercT5 <- ggplot(data = (subset(d_Pgm,Supervisor.PI=='Abbott')), aes(x=Population_Lat, y=PercT5, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_Pgm_Abbott_PercT5", x="Population", y = "PercT5") + ylim(c(min(d_Pgm$PercT5) , max(d_Pgm$PercT5)))+ droseu_theme
## quartz_off_screen
## 2
p_Pgm_pop_Abbott_PercT5 <- ggplot(data = (subset(d_Pgm,Supervisor.PI=='Abbott')), aes(x=Population_Lat, y=PercT5, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_Pgm_pop_Abbott_PercT5", x="Population", y = "PercT5") + ylim(c(min(d_Pgm$PercT5) , max(d_Pgm$PercT5)))+ droseu_theme
## quartz_off_screen
## 2
PercT6
Pgm_lmer_Abbott_PercT6 <- lmer(PercT6 ~ -1 + Population + (1|Line:Population) , data = (subset(d_Pgm,Supervisor.PI=='Abbott')))
capture.output(summary(Pgm_lmer_Abbott_PercT6),file = "Pigmentation/Pgm_lmer_Abbott_PercT6_sum.txt")
capture.output(anova(Pgm_lmer_Abbott_PercT6),file = "Pigmentation/Pgm_lmer_Abbott_PercT6.txt")
anova(Pgm_lmer_Abbott_PercT6)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 246476 27386 9 151.69 171.06 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(Pgm_lmer_Abbott_PercT6)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PercT6 ~ -1 + Population + (1 | Line:Population)
## Data: (subset(d_Pgm, Supervisor.PI == "Abbott"))
##
## REML criterion at convergence: 15794.7
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.3191 -0.6368 -0.0337 0.5949 3.1370
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 130.3 11.42
## Residual 160.1 12.65
## Number of obs: 1953, groups: Line:Population, 161
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 34.383 2.674 150.252 12.86 <2e-16 ***
## PopulationGI 33.934 3.206 152.282 10.58 <2e-16 ***
## PopulationKA 32.871 2.751 152.066 11.95 <2e-16 ***
## PopulationMA 47.543 2.828 152.330 16.81 <2e-16 ***
## PopulationMU 31.476 2.906 151.430 10.83 <2e-16 ***
## PopulationRE 42.547 2.999 152.260 14.19 <2e-16 ***
## PopulationUM 41.836 2.824 151.574 14.81 <2e-16 ***
## PopulationVA 33.891 2.745 150.766 12.34 <2e-16 ***
## PopulationYE 32.465 2.683 152.305 12.10 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.000
## PopulatinKA 0.000 0.000
## PopulatinMA 0.000 0.000 0.000
## PopulatinMU 0.000 0.000 0.000 0.000
## PopulatinRE 0.000 0.000 0.000 0.000 0.000
## PopulatinUM 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinVA 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinYE 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
p_Pgm_Abbott_PercT6 <- ggplot(data = (subset(d_Pgm,Supervisor.PI=='Abbott')), aes(x=Population_Lat, y=PercT6, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_Pgm_Abbott_PercT6", x="Population", y = "PercT6") + ylim(c(min(d_Pgm$PercT6) , max(d_Pgm$PercT6)))+ droseu_theme
## quartz_off_screen
## 2
p_Pgm_pop_Abbott_PercT6 <- ggplot(data = (subset(d_Pgm,Supervisor.PI=='Abbott')), aes(x=Population_Lat, y=PercT6, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_Pgm_pop_Abbott_PercT6", x="Population", y = "PercT6") + ylim(c(min(d_Pgm$PercT6) , max(d_Pgm$PercT6)))+ droseu_theme
## quartz_off_screen
## 2
TotalPerc
Pgm_lmer_Abbott_TotalPerc <- lmer(TotalPerc ~ -1 + Population + (1|Line:Population) , data = (subset(d_Pgm,Supervisor.PI=='Abbott')))
capture.output(summary(Pgm_lmer_Abbott_TotalPerc),file = "Pigmentation/Pgm_lmer_Abbott_TotalPerc_sum.txt")
capture.output(anova(Pgm_lmer_Abbott_TotalPerc),file = "Pigmentation/Pgm_lmer_Abbott_TotalPerc.txt")
anova(Pgm_lmer_Abbott_TotalPerc)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 100129 11126 9 151.48 325.16 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(Pgm_lmer_Abbott_TotalPerc)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: TotalPerc ~ -1 + Population + (1 | Line:Population)
## Data: (subset(d_Pgm, Supervisor.PI == "Abbott"))
##
## REML criterion at convergence: 12772.5
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.7535 -0.6401 -0.0873 0.5628 4.8794
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 23.64 4.862
## Residual 34.22 5.849
## Number of obs: 1953, groups: Line:Population, 161
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 21.019 1.148 149.802 18.32 <2e-16 ***
## PopulationGI 19.740 1.377 152.160 14.34 <2e-16 ***
## PopulationKA 17.614 1.181 151.915 14.91 <2e-16 ***
## PopulationMA 30.027 1.214 152.217 24.73 <2e-16 ***
## PopulationMU 20.547 1.247 151.179 16.47 <2e-16 ***
## PopulationRE 25.145 1.288 152.133 19.52 <2e-16 ***
## PopulationUM 23.795 1.213 151.346 19.62 <2e-16 ***
## PopulationVA 16.142 1.178 150.410 13.70 <2e-16 ***
## PopulationYE 20.815 1.152 152.192 18.07 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.000
## PopulatinKA 0.000 0.000
## PopulatinMA 0.000 0.000 0.000
## PopulatinMU 0.000 0.000 0.000 0.000
## PopulatinRE 0.000 0.000 0.000 0.000 0.000
## PopulatinUM 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinVA 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinYE 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
p_Pgm_Abbott_TotalPerc <- ggplot(data = (subset(d_Pgm,Supervisor.PI=='Abbott')), aes(x=Population_Lat, y=TotalPerc, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_Pgm_Abbott_TotalPerc", x="Population", y = "TotalPerc") + ylim(c(min(d_Pgm$TotalPerc) , max(d_Pgm$TotalPerc)))+ droseu_theme
## quartz_off_screen
## 2
p_Pgm_pop_Abbott_TotalPerc <- ggplot(data = (subset(d_Pgm,Supervisor.PI=='Abbott')), aes(x=Population_Lat, y=TotalPerc, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_Pgm_pop_Abbott_TotalPerc", x="Population", y = "TotalPerc") + ylim(c(min(d_Pgm$TotalPerc) , max(d_Pgm$TotalPerc)))+ droseu_theme
## quartz_off_screen
## 2
PercT4
Pgm_lmer_Gibert_PercT4 <- lmer(PercT4 ~ -1 + Population + (1|Line:Population) +
(1|Batch), data = (subset(d_Pgm,Supervisor.PI=='Gibert')))
capture.output(summary(Pgm_lmer_Gibert_PercT4),file = "Pigmentation/Pgm_lmer_Gibert_PercT4_sum.txt")
capture.output(anova(Pgm_lmer_Gibert_PercT4),file = "Pigmentation/Pgm_lmer_Gibert_PercT4.txt")
anova(Pgm_lmer_Gibert_PercT4)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 33916 3768.4 9 2 41.486 0.02375 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(Pgm_lmer_Gibert_PercT4)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PercT4 ~ -1 + Population + (1 | Line:Population) + (1 | Batch)
## Data: (subset(d_Pgm, Supervisor.PI == "Gibert"))
##
## REML criterion at convergence: 12935.9
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.4920 -0.6719 -0.1283 0.5731 5.9803
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 15.601 3.950
## Batch (Intercept) 3.226 1.796
## Residual 90.836 9.531
## Number of obs: 1741, groups: Line:Population, 167; Batch, 3
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 24.283 1.579 4.554 15.37 4.25e-05 ***
## PopulationGI 23.395 1.761 5.580 13.28 1.96e-05 ***
## PopulationKA 20.859 1.641 4.220 12.71 0.00016 ***
## PopulationMA 23.780 1.665 4.464 14.29 6.76e-05 ***
## PopulationMU 25.072 1.642 4.227 15.27 7.39e-05 ***
## PopulationRE 19.969 1.731 5.218 11.53 6.54e-05 ***
## PopulationUM 24.473 1.681 4.647 14.55 4.70e-05 ***
## PopulationVA 24.307 1.661 4.422 14.64 6.48e-05 ***
## PopulationYE 25.401 1.654 4.350 15.36 5.91e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.487
## PopulatinKA 0.522 0.509
## PopulatinMA 0.515 0.501 0.539
## PopulatinMU 0.522 0.509 0.547 0.539
## PopulatinRE 0.496 0.485 0.518 0.510 0.518
## PopulatinUM 0.510 0.497 0.534 0.526 0.534 0.505
## PopulatinVA 0.516 0.502 0.541 0.533 0.540 0.511 0.528
## PopulatinYE 0.518 0.505 0.543 0.535 0.542 0.514 0.530 0.536
p_Pgm_Gibert_PercT4 <- ggplot(data = (subset(d_Pgm,Supervisor.PI=='Gibert')), aes(x=Population_Lat, y=PercT4, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_Pgm_Gibert_PercT4", x="Population", y = "PercT4") + ylim(c(min(d_Pgm$PercT4) , max(d_Pgm$PercT4)))+ droseu_theme
## quartz_off_screen
## 2
p_Pgm_pop_Gibert_PercT4 <- ggplot(data = (subset(d_Pgm,Supervisor.PI=='Gibert')), aes(x=Population_Lat, y=PercT4, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_Pgm_pop_Gibert_PercT4", x="Population", y = "PercT4") + ylim(c(min(d_Pgm$PercT4) , max(d_Pgm$PercT4)))+ droseu_theme
## quartz_off_screen
## 2
PercT5
Pgm_lmer_Gibert_PercT5 <- lmer(PercT5 ~ -1 + Population + (1|Line:Population) +
(1|Batch), data = (subset(d_Pgm,Supervisor.PI=='Gibert')))
## boundary (singular) fit: see ?isSingular
capture.output(summary(Pgm_lmer_Gibert_PercT5),file = "Pigmentation/Pgm_lmer_Gibert_PercT5_sum.txt")
capture.output(anova(Pgm_lmer_Gibert_PercT5),file = "Pigmentation/Pgm_lmer_Gibert_PercT5.txt")
anova(Pgm_lmer_Gibert_PercT5)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 399387 44376 9 157.33 420.43 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(Pgm_lmer_Gibert_PercT5)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PercT5 ~ -1 + Population + (1 | Line:Population) + (1 | Batch)
## Data: (subset(d_Pgm, Supervisor.PI == "Gibert"))
##
## REML criterion at convergence: 13270.3
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.9328 -0.6447 -0.0768 0.5422 5.7227
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 36.17 6.014
## Batch (Intercept) 0.00 0.000
## Residual 105.55 10.274
## Number of obs: 1741, groups: Line:Population, 167; Batch, 3
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 32.603 1.525 156.954 21.39 <2e-16 ***
## PopulationGI 29.152 1.757 155.855 16.59 <2e-16 ***
## PopulationKA 29.325 1.524 156.586 19.25 <2e-16 ***
## PopulationMA 36.393 1.568 158.331 23.20 <2e-16 ***
## PopulationMU 34.539 1.525 156.954 22.66 <2e-16 ***
## PopulationRE 30.902 1.702 156.037 18.16 <2e-16 ***
## PopulationUM 32.690 1.605 156.342 20.36 <2e-16 ***
## PopulationVA 32.058 1.563 156.470 20.51 <2e-16 ***
## PopulationYE 33.204 1.541 162.629 21.55 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.000
## PopulatinKA 0.000 0.000
## PopulatinMA 0.000 0.000 0.000
## PopulatinMU 0.000 0.000 0.000 0.000
## PopulatinRE 0.000 0.000 0.000 0.000 0.000
## PopulatinUM 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinVA 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinYE 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## optimizer (nloptwrap) convergence code: 0 (OK)
## boundary (singular) fit: see ?isSingular
p_Pgm_Gibert_PercT5 <- ggplot(data = (subset(d_Pgm,Supervisor.PI=='Gibert')), aes(x=Population_Lat, y=PercT5, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_Pgm_Gibert_PercT5", x="Population", y = "PercT5") + ylim(c(min(d_Pgm$PercT5) , max(d_Pgm$PercT5)))+ droseu_theme
## quartz_off_screen
## 2
p_Pgm_pop_Gibert_PercT5 <- ggplot(data = (subset(d_Pgm,Supervisor.PI=='Gibert')), aes(x=Population_Lat, y=PercT5, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_Pgm_pop_Gibert_PercT5", x="Population", y = "PercT5") + ylim(c(min(d_Pgm$PercT5) , max(d_Pgm$PercT5)))+ droseu_theme
## quartz_off_screen
## 2
PercT6
Pgm_lmer_Gibert_PercT6 <- lmer(PercT6 ~ -1 + Population + (1|Line:Population) +
(1|Batch), data = (subset(d_Pgm,Supervisor.PI=='Gibert')))
capture.output(summary(Pgm_lmer_Gibert_PercT6),file = "Pigmentation/Pgm_lmer_Gibert_PercT6_sum.txt")
capture.output(anova(Pgm_lmer_Gibert_PercT6),file = "Pigmentation/Pgm_lmer_Gibert_PercT6.txt")
anova(Pgm_lmer_Gibert_PercT6)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 100142 11127 9 2 53.671 0.01842 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(Pgm_lmer_Gibert_PercT6)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PercT6 ~ -1 + Population + (1 | Line:Population) + (1 | Batch)
## Data: (subset(d_Pgm, Supervisor.PI == "Gibert"))
##
## REML criterion at convergence: 14560.6
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -4.0930 -0.6255 0.0378 0.6407 2.8805
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 173.498 13.172
## Batch (Intercept) 9.633 3.104
## Residual 207.318 14.399
## Number of obs: 1741, groups: Line:Population, 167; Batch, 3
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 46.726 3.687 10.340 12.67 1.25e-07 ***
## PopulationGI 46.167 4.191 12.542 11.02 8.20e-08 ***
## PopulationKA 58.051 3.783 8.488 15.34 1.74e-07 ***
## PopulationMA 55.051 3.855 9.126 14.28 1.49e-07 ***
## PopulationMU 52.365 3.784 8.495 13.84 4.03e-07 ***
## PopulationRE 54.235 4.092 11.460 13.26 2.65e-08 ***
## PopulationUM 53.626 3.922 9.756 13.67 1.10e-07 ***
## PopulationVA 51.340 3.850 9.082 13.33 2.86e-07 ***
## PopulationYE 49.100 3.798 8.622 12.93 6.11e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.272
## PopulatinKA 0.301 0.291
## PopulatinMA 0.295 0.285 0.317
## PopulatinMU 0.301 0.291 0.323 0.317
## PopulatinRE 0.279 0.271 0.299 0.293 0.299
## PopulatinUM 0.290 0.281 0.312 0.306 0.312 0.288
## PopulatinVA 0.296 0.286 0.318 0.312 0.318 0.293 0.307
## PopulatinYE 0.300 0.290 0.322 0.316 0.322 0.297 0.311 0.317
p_Pgm_Gibert_PercT6 <- ggplot(data = (subset(d_Pgm,Supervisor.PI=='Gibert')), aes(x=Population_Lat, y=PercT6, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_Pgm_Gibert_PercT6", x="Population", y = "PercT6") + ylim(c(min(d_Pgm$PercT6) , max(d_Pgm$PercT6)))+ droseu_theme
## quartz_off_screen
## 2
p_Pgm_pop_Gibert_PercT6 <- ggplot(data = (subset(d_Pgm,Supervisor.PI=='Gibert')), aes(x=Population_Lat, y=PercT6, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_Pgm_pop_Gibert_PercT6", x="Population", y = "PercT6") + ylim(c(min(d_Pgm$PercT6) , max(d_Pgm$PercT6)))+ droseu_theme
## quartz_off_screen
## 2
TotalPerc
Pgm_lmer_Gibert_TotalPerc <- lmer(TotalPerc ~ -1 + Population + (1|Line:Population) +
(1|Batch), data = (subset(d_Pgm,Supervisor.PI=='Gibert')))
## boundary (singular) fit: see ?isSingular
capture.output(summary(Pgm_lmer_Gibert_TotalPerc),file = "Pigmentation/Pgm_lmer_Gibert_TotalPerc_sum.txt")
capture.output(anova(Pgm_lmer_Gibert_TotalPerc),file = "Pigmentation/Pgm_lmer_Gibert_TotalPerc.txt")
anova(Pgm_lmer_Gibert_TotalPerc)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 348622 38736 9 157.95 526.8 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(Pgm_lmer_Gibert_TotalPerc)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: TotalPerc ~ -1 + Population + (1 | Line:Population) + (1 | Batch)
## Data: (subset(d_Pgm, Supervisor.PI == "Gibert"))
##
## REML criterion at convergence: 12682.4
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.2632 -0.6733 -0.0496 0.6084 4.5241
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 34.06 5.836
## Batch (Intercept) 0.00 0.000
## Residual 73.53 8.575
## Number of obs: 1741, groups: Line:Population, 167; Batch, 3
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 33.307 1.436 157.600 23.19 <2e-16 ***
## PopulationGI 31.425 1.656 156.755 18.97 <2e-16 ***
## PopulationKA 33.445 1.435 157.305 23.30 <2e-16 ***
## PopulationMA 36.135 1.477 158.778 24.47 <2e-16 ***
## PopulationMU 35.380 1.436 157.600 24.64 <2e-16 ***
## PopulationRE 33.354 1.604 156.892 20.80 <2e-16 ***
## PopulationUM 35.303 1.513 157.122 23.34 <2e-16 ***
## PopulationVA 34.543 1.473 157.218 23.46 <2e-16 ***
## PopulationYE 34.505 1.449 162.399 23.82 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.000
## PopulatinKA 0.000 0.000
## PopulatinMA 0.000 0.000 0.000
## PopulatinMU 0.000 0.000 0.000 0.000
## PopulatinRE 0.000 0.000 0.000 0.000 0.000
## PopulatinUM 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinVA 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinYE 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## optimizer (nloptwrap) convergence code: 0 (OK)
## boundary (singular) fit: see ?isSingular
p_Pgm_Gibert_TotalPerc <- ggplot(data = (subset(d_Pgm,Supervisor.PI=='Gibert')), aes(x=Population_Lat, y=TotalPerc, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_Pgm_Gibert_TotalPerc", x="Population", y = "TotalPerc") + ylim(c(min(d_Pgm$TotalPerc) , max(d_Pgm$TotalPerc)))+ droseu_theme
## quartz_off_screen
## 2
p_Pgm_pop_Gibert_TotalPerc <- ggplot(data = (subset(d_Pgm,Supervisor.PI=='Gibert')), aes(x=Population_Lat, y=TotalPerc, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_Pgm_pop_Gibert_TotalPerc", x="Population", y = "TotalPerc") + ylim(c(min(d_Pgm$TotalPerc) , max(d_Pgm$TotalPerc)))+ droseu_theme
## quartz_off_screen
## 2
Tergite8
Pgm2_lmer_Schmidt_Tergite8 <- lmer(Tergite8 ~ -1 + Population + (1|Line:Population), data = (subset(d_Pgm2,Supervisor.PI=='Schmidt')))
capture.output(summary(Pgm2_lmer_Schmidt_Tergite8),file = "Pigmentation/Pgm2_lmer_Schmidt_Tergite8_sum.txt")
capture.output(anova(Pgm2_lmer_Schmidt_Tergite8),file = "Pigmentation/Pgm2_lmer_Schmidt_Tergite8.txt")
anova(Pgm2_lmer_Schmidt_Tergite8)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 1069.9 118.88 9 147.4 165.38 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(Pgm2_lmer_Schmidt_Tergite8)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Tergite8 ~ -1 + Population + (1 | Line:Population)
## Data: (subset(d_Pgm2, Supervisor.PI == "Schmidt"))
##
## REML criterion at convergence: 4128.7
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.3233 -0.6262 -0.0680 0.5288 7.2893
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 0.5292 0.7274
## Residual 0.7188 0.8478
## Number of obs: 1514, groups: Line:Population, 157
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 2.2700 0.1734 145.4931 13.094 < 2e-16 ***
## PopulationGI 2.0095 0.2165 149.3116 9.282 < 2e-16 ***
## PopulationKA 2.4947 0.1779 145.4931 14.026 < 2e-16 ***
## PopulationMA 2.8561 0.1786 147.7121 15.988 < 2e-16 ***
## PopulationMU 2.2815 0.1736 146.1725 13.144 < 2e-16 ***
## PopulationRE 2.4794 0.2091 150.6759 11.855 < 2e-16 ***
## PopulationUM 2.8021 0.2007 146.8367 13.963 < 2e-16 ***
## PopulationVA 1.6406 0.1882 145.9781 8.717 5.78e-15 ***
## PopulationYE 2.4311 0.1745 149.1257 13.935 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.000
## PopulatinKA 0.000 0.000
## PopulatinMA 0.000 0.000 0.000
## PopulatinMU 0.000 0.000 0.000 0.000
## PopulatinRE 0.000 0.000 0.000 0.000 0.000
## PopulatinUM 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinVA 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinYE 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
p_Pgm2_Schmidt_Tergite8 <- ggplot(data = (subset(d_Pgm2,Supervisor.PI=='Schmidt')), aes(x=Population_Lat, y=Tergite8, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_Pgm2_Schmidt_Tergite8", x="Population", y = "Tergite8") + ylim(c(min(d_Pgm2$Tergite8) , max(d_Pgm2$Tergite8)))+ droseu_theme
## quartz_off_screen
## 2
p_Pgm2_pop_Schmidt_Tergite8 <- ggplot(data = (subset(d_Pgm2,Supervisor.PI=='Schmidt')), aes(x=Population_Lat, y=Tergite8, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_Pgm2_pop_Schmidt_Tergite8", x="Population", y = "Tergite8") + ylim(c(min(d_Pgm2$Tergite8) , max(d_Pgm2$Tergite8)))+ droseu_theme
## quartz_off_screen
## 2
Tergite9
Pgm2_lmer_Schmidt_Tergite9 <- lmer(Tergite9 ~ -1 + Population + (1|Line:Population) , data = (subset(d_Pgm2,Supervisor.PI=='Schmidt')))
capture.output(summary(Pgm2_lmer_Schmidt_Tergite9),file = "Pigmentation/Pgm2_lmer_Schmidt_Tergite9_sum.txt")
capture.output(anova(Pgm2_lmer_Schmidt_Tergite9),file = "Pigmentation/Pgm2_lmer_Schmidt_Tergite9.txt")
anova(Pgm2_lmer_Schmidt_Tergite9)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 2617.1 290.79 9 148.09 114.11 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(Pgm2_lmer_Schmidt_Tergite9)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Tergite9 ~ -1 + Population + (1 | Line:Population)
## Data: (subset(d_Pgm2, Supervisor.PI == "Schmidt"))
##
## REML criterion at convergence: 6123.5
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.2209 -0.6482 -0.0807 0.5799 3.6192
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 3.671 1.916
## Residual 2.548 1.596
## Number of obs: 1514, groups: Line:Population, 157
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 4.5450 0.4430 146.9794 10.258 < 2e-16 ***
## PopulationGI 4.1449 0.5516 149.1735 7.514 4.91e-12 ***
## PopulationKA 5.0316 0.4546 146.9794 11.069 < 2e-16 ***
## PopulationMA 5.5072 0.4557 148.3570 12.085 < 2e-16 ***
## PopulationMU 4.8823 0.4433 147.3678 11.012 < 2e-16 ***
## PopulationRE 5.5056 0.5323 149.9741 10.343 < 2e-16 ***
## PopulationUM 6.3034 0.5123 147.7640 12.304 < 2e-16 ***
## PopulationVA 4.8631 0.4808 147.2518 10.115 < 2e-16 ***
## PopulationYE 4.7625 0.4446 149.0248 10.712 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.000
## PopulatinKA 0.000 0.000
## PopulatinMA 0.000 0.000 0.000
## PopulatinMU 0.000 0.000 0.000 0.000
## PopulatinRE 0.000 0.000 0.000 0.000 0.000
## PopulatinUM 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinVA 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinYE 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
p_Pgm2_Schmidt_Tergite9 <- ggplot(data = (subset(d_Pgm2,Supervisor.PI=='Schmidt')), aes(x=Population_Lat, y=Tergite9, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_Pgm2_Schmidt_Tergite9", x="Population", y = "Tergite9") + ylim(c(min(d_Pgm2$Tergite9) , max(d_Pgm2$Tergite9)))+ droseu_theme
## quartz_off_screen
## 2
p_Pgm2_pop_Schmidt_Tergite9 <- ggplot(data = (subset(d_Pgm2,Supervisor.PI=='Schmidt')), aes(x=Population_Lat, y=Tergite9, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_Pgm2_pop_Schmidt_Tergite9", x="Population", y = "Tergite9") + ylim(c(min(d_Pgm2$Tergite9) , max(d_Pgm2$Tergite9)))+ droseu_theme
## quartz_off_screen
## 2
Tergite10
Pgm2_lmer_Schmidt_Tergite10 <- lmer(Tergite10 ~ -1 + Population + (1|Line:Population), data = (subset(d_Pgm2,Supervisor.PI=='Schmidt')))
capture.output(summary(Pgm2_lmer_Schmidt_Tergite10),file = "Pigmentation/Pgm2_lmer_Schmidt_Tergite10_sum.txt")
capture.output(anova(Pgm2_lmer_Schmidt_Tergite10),file = "Pigmentation/Pgm2_lmer_Schmidt_Tergite10.txt")
anova(Pgm2_lmer_Schmidt_Tergite10)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 1634 181.56 9 148.34 43.01 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(Pgm2_lmer_Schmidt_Tergite10)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Tergite10 ~ -1 + Population + (1 | Line:Population)
## Data: (subset(d_Pgm2, Supervisor.PI == "Schmidt"))
##
## REML criterion at convergence: 6832.2
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.7236 -0.6439 -0.1671 0.6539 3.2399
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 4.184 2.045
## Residual 4.221 2.055
## Number of obs: 1514, groups: Line:Population, 157
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 2.1450 0.4799 146.8229 4.470 1.56e-05 ***
## PopulationGI 2.2609 0.5984 149.8458 3.778 0.000227 ***
## PopulationKA 3.5737 0.4924 146.8229 7.258 2.11e-11 ***
## PopulationMA 3.7757 0.4941 148.6485 7.642 2.43e-12 ***
## PopulationMU 2.9894 0.4803 147.3594 6.223 4.79e-09 ***
## PopulationRE 3.0707 0.5778 150.9371 5.315 3.77e-07 ***
## PopulationUM 4.7811 0.5552 147.8953 8.611 9.93e-15 ***
## PopulationVA 3.7539 0.5209 147.2024 7.207 2.76e-11 ***
## PopulationYE 3.3644 0.4823 149.6693 6.976 9.12e-11 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.000
## PopulatinKA 0.000 0.000
## PopulatinMA 0.000 0.000 0.000
## PopulatinMU 0.000 0.000 0.000 0.000
## PopulatinRE 0.000 0.000 0.000 0.000 0.000
## PopulatinUM 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinVA 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinYE 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
p_Pgm2_Schmidt_Tergite10 <- ggplot(data = (subset(d_Pgm2,Supervisor.PI=='Schmidt')), aes(x=Population_Lat, y=Tergite10, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_Pgm2_Schmidt_Tergite10", x="Population", y = "Tergite10") + ylim(c(min(d_Pgm2$Tergite10) , max(d_Pgm2$Tergite10)))+ droseu_theme
## quartz_off_screen
## 2
p_Pgm2_pop_Schmidt_Tergite10 <- ggplot(data = (subset(d_Pgm2,Supervisor.PI=='Schmidt')), aes(x=Population_Lat, y=Tergite10, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_Pgm2_pop_Schmidt_Tergite10", x="Population", y = "Tergite10") + ylim(c(min(d_Pgm2$Tergite10) , max(d_Pgm2$Tergite10)))+ droseu_theme
## quartz_off_screen
## 2
Total
Pgm2_lmer_Schmidt_Total <- lmer(Total ~ -1 + Population + (1|Line:Population), data = (subset(d_Pgm2,Supervisor.PI=='Schmidt')))
capture.output(summary(Pgm2_lmer_Schmidt_Total),file = "Pigmentation/Pgm2_lmer_Schmidt_Total_sum.txt")
capture.output(anova(Pgm2_lmer_Schmidt_Total),file = "Pigmentation/Pgm2_lmer_Schmidt_Total.txt")
anova(Pgm2_lmer_Schmidt_Total)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Population 12734 1414.9 9 148.07 104.26 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(Pgm2_lmer_Schmidt_Total)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Total ~ -1 + Population + (1 | Line:Population)
## Data: (subset(d_Pgm2, Supervisor.PI == "Schmidt"))
##
## REML criterion at convergence: 8630.2
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.7804 -0.6403 -0.1225 0.6108 4.0733
##
## Random effects:
## Groups Name Variance Std.Dev.
## Line:Population (Intercept) 18.12 4.257
## Residual 13.57 3.684
## Number of obs: 1514, groups: Line:Population, 157
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## PopulationAK 8.9600 0.9869 146.8837 9.079 6.73e-16 ***
## PopulationGI 8.4120 1.2291 149.2273 6.844 1.87e-10 ***
## PopulationKA 11.1000 1.0126 146.8837 10.962 < 2e-16 ***
## PopulationMA 12.1458 1.0153 148.3448 11.963 < 2e-16 ***
## PopulationMU 10.1531 0.9876 147.2988 10.280 < 2e-16 ***
## PopulationRE 11.0455 1.1862 150.0807 9.312 < 2e-16 ***
## PopulationUM 13.8863 1.1413 147.7205 12.167 < 2e-16 ***
## PopulationVA 10.2588 1.0710 147.1752 9.579 < 2e-16 ***
## PopulationYE 10.5582 0.9907 149.0724 10.658 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## PpltAK PpltGI PpltKA PpltMA PpltMU PpltRE PpltUM PpltVA
## PopulatinGI 0.000
## PopulatinKA 0.000 0.000
## PopulatinMA 0.000 0.000 0.000
## PopulatinMU 0.000 0.000 0.000 0.000
## PopulatinRE 0.000 0.000 0.000 0.000 0.000
## PopulatinUM 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinVA 0.000 0.000 0.000 0.000 0.000 0.000 0.000
## PopulatinYE 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
p_Pgm2_Schmidt_Total <- ggplot(data = (subset(d_Pgm2,Supervisor.PI=='Schmidt')), aes(x=Population_Lat, y=Total, fill=Batch)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_Pgm2_Schmidt_Total", x="Population", y = "Total") + ylim(c(min(d_Pgm2$Total) , max(d_Pgm2$Total)))+ droseu_theme
## quartz_off_screen
## 2
p_Pgm2_pop_Schmidt_Total <- ggplot(data = (subset(d_Pgm2,Supervisor.PI=='Schmidt')), aes(x=Population_Lat, y=Total, fill=Population)) +
geom_boxplot(outlier.shape = NA, notch=FALSE) +
labs(title="p_Pgm2_pop_Schmidt_Total", x="Population", y = "Total") + ylim(c(min(d_Pgm2$Total) , max(d_Pgm2$Total)))+ droseu_theme
## quartz_off_screen
## 2
intersect_Line_Pgm <- Reduce(intersect, list(d_Pgm$Line[d_Pgm$Supervisor.PI == "Abbott"],
d_Pgm2$Line[d_Pgm2$Supervisor.PI == "Schmidt"],
d_Pgm$Line[d_Pgm$Supervisor.PI == "Gibert"]))
write(intersect_Line_Pgm, file ="Pigmentation/intersect_Line_Pgm.txt", sep = "\t")
intersect_Pop_Pgm <- Reduce(intersect, list(d_Pgm$Population[d_Pgm$Supervisor.PI == "Abbott"],
d_Pgm2$Population[d_Pgm2$Supervisor.PI == "Schmidt"],
d_Pgm$Population[d_Pgm$Supervisor.PI == "Gibert"]))
write(intersect_Pop_Pgm, file ="Pigmentation/intersect_Pop_Pgm", sep = "\t")
There are 9 populations and 149 isofemale lines that have been phenotyped across the labs. Please refer to tables named intersect_Trait_level (i.e. intersect_Via_pop) for details.
Pgm_TotalPerc_fitted <- combineFitted(labs = c("Abbott", "Gibert", "Schmidt"), sex = rep("F", 3), models = list(Pgm_lmer_Abbott_TotalPerc, Pgm_lmer_Gibert_TotalPerc, Pgm2_lmer_Schmidt_Total))
p_Pgm_TotalPerc_lab_cor <- function() scatterPlotMatrix(Pgm_TotalPerc_fitted, sex = "F")
p_Pgm_TotalPerc_lab_cor()
pdf(file="Pigmentation/p_Pgm_TotalPerc_lab_cor.pdf", width=8, height=8)
p_Pgm_TotalPerc_lab_cor()
invisible(dev.off())
Via_effects <- Via_fitted %>%
dplyr::select(-Value) %>%
mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")), Lab = as.factor(Lab), V = SE^2, Study = paste(Population, Lab, sep = "_")) %>%
relocate(Population, Sex, Lab, Study) %>%
arrange(Population) %>%
dplyr::rename(Y = Estimate)
# run the analysis with metagen package
Via_metagen <- metagen(data = Via_effects %>% filter(Sex == "NA"), TE = Y, seTE = SE, studlab = Study, sm = "SMD", fixed = FALSE, random = TRUE, method.tau = "DL")
Via_metagen <- update.meta(Via_metagen, subgroup = Population, tau.common = FALSE)
capture.output(summary(Via_metagen), file = "Viability/Via_metagen_sum.txt")
Via_metagen
## Number of studies combined: k = 48
##
## SMD 95%-CI z p-value
## Random effects model 0.6535 [0.6319; 0.6752] 59.03 0
##
## Quantifying heterogeneity:
## tau^2 = 0.0047 [0.0030; 0.0081]; tau = 0.0686 [0.0544; 0.0902]
## I^2 = 82.5% [77.4%; 86.4%]; H = 2.39 [2.10; 2.71]
##
## Test of heterogeneity:
## Q d.f. p-value
## 268.03 47 < 0.0001
##
## Results for subgroups (random effects model):
## k SMD 95%-CI tau^2 tau Q I^2
## Population = YE 5 0.5266 [0.4994; 0.5539] 0 0 2.81 0.0%
## Population = RE 6 0.6358 [0.6097; 0.6619] 0 0 0.48 0.0%
## Population = GI 5 0.6010 [0.5618; 0.6402] 0.0006 0.0254 5.94 32.7%
## Population = MU 6 0.6817 [0.6338; 0.7296] 0.0026 0.0506 18.92 73.6%
## Population = MA 5 0.6539 [0.5965; 0.7113] 0.0032 0.0562 16.57 75.9%
## Population = UM 5 0.6957 [0.6336; 0.7577] 0.0037 0.0608 17.02 76.5%
## Population = KA 5 0.7199 [0.6830; 0.7568] 0.0007 0.0273 6.99 42.8%
## Population = VA 5 0.6429 [0.5836; 0.7022] 0.0035 0.0588 17.85 77.6%
## Population = AK 6 0.7204 [0.6799; 0.7609] 0.0016 0.0396 13.56 63.1%
##
## Test for subgroup differences (random effects model):
## Q d.f. p-value
## Between groups 108.86 8 < 0.0001
##
## Details on meta-analytical method:
## - Inverse variance method
## - DerSimonian-Laird estimator for tau^2
## - Jackson method for confidence interval of tau^2 and tau
# run the analysis with EK's code for quick plotting
Via_meta <- metaAnalysisRandomModel(Via_effects %>% filter(Sex == "NA"))
p_Via_meta_SE <- Via_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, SEMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = Mstar + SEMstar, xmin = Mstar - SEMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with SE") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", Via_meta$Qtest_het$Q),
hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", Via_meta$Qtest_het$p),
hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_Via_meta_CI <- Via_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, ULMstar, LLMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = ULMstar, xmin = LLMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Age at death (days)", title = "Pop. summary effect with 95% CI") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", Via_meta$Qtest_het$Q),
hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", Via_meta$Qtest_het$p),
hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_Via_meta <- ggarrange(p_Via_meta_SE, p_Via_meta_CI)
p_Via_meta
DT_A_effects <- DT_A_fitted %>%
dplyr::select(-Value) %>%
mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")),
Lab = as.factor(Lab),
V = SE^2,
Study = paste(Population, Lab, sep = "_")) %>%
relocate(Population, Sex, Lab, Study) %>%
arrange(Population) %>%
dplyr::rename(Y = Estimate)
# run the analysis with metagen package
DT_A_F_metagen <- metagen(data = DT_A_effects %>% filter(Sex == "F"), TE = Y, seTE = SE, studlab = Study, sm = "SMD", fixed = FALSE, random = TRUE, method.tau = "DL")
DT_A_F_metagen <- update.meta(DT_A_F_metagen, subgroup = Population, tau.common = FALSE)
capture.output(summary(DT_A_F_metagen), file = "DevelopmentTime/DT_A_F_metagen_sum.txt")
DT_A_F_metagen
## Number of studies combined: k = 48
##
## SMD 95%-CI z p-value
## Random effects model 235.0250 [229.0286; 241.0213] 76.82 0
##
## Quantifying heterogeneity:
## tau^2 = 438.3997 [318.7134; 790.2616]; tau = 20.9380 [17.8525; 28.1116]
## I^2 = 99.0% [98.9%; 99.1%]; H = 10.26 [9.75; 10.79]
##
## Test of heterogeneity:
## Q d.f. p-value
## 4944.28 47 0
##
## Results for subgroups (random effects model):
## k SMD 95%-CI tau^2 tau Q
## Population = YE 5 226.6241 [218.4126; 234.8356] 78.1653 8.8411 68.56
## Population = RE 6 249.7435 [227.5006; 271.9865] 760.1497 27.5708 611.67
## Population = GI 5 231.9296 [224.7327; 239.1265] 54.7206 7.3973 40.64
## Population = MU 6 239.9889 [210.3381; 269.6398] 1364.1978 36.9350 1638.28
## Population = MA 5 229.4643 [222.6121; 236.3164] 51.8470 7.2005 47.79
## Population = UM 5 230.3775 [223.4138; 237.3412] 52.8420 7.2693 44.77
## Population = KA 5 225.6804 [221.1081; 230.2527] 19.2827 4.3912 20.38
## Population = VA 5 233.7683 [226.7707; 240.7659] 54.4184 7.3769 49.83
## Population = AK 6 240.0130 [208.5734; 271.4527] 1534.8028 39.1766 1883.98
## I^2
## Population = YE 94.2%
## Population = RE 99.2%
## Population = GI 90.2%
## Population = MU 99.7%
## Population = MA 91.6%
## Population = UM 91.1%
## Population = KA 80.4%
## Population = VA 92.0%
## Population = AK 99.7%
##
## Test for subgroup differences (random effects model):
## Q d.f. p-value
## Between groups 9.17 8 0.3282
##
## Details on meta-analytical method:
## - Inverse variance method
## - DerSimonian-Laird estimator for tau^2
## - Jackson method for confidence interval of tau^2 and tau
# run the analysis with EK's code for quick plotting
DT_A_F_meta <- metaAnalysisRandomModel(DT_A_effects %>% filter(Sex == "F"))
p_DT_A_F_meta_SE <- DT_A_F_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, SEMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = Mstar + SEMstar, xmin = Mstar - SEMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with SE") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", DT_A_F_meta$Qtest_het$Q),
hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", DT_A_F_meta$Qtest_het$p),
hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_DT_A_F_meta_CI <- DT_A_F_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, ULMstar, LLMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = ULMstar, xmin = LLMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with 95% CI") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", DT_A_F_meta$Qtest_het$Q),
hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", DT_A_F_meta$Qtest_het$p),
hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_DT_A_F_meta <- ggarrange(p_DT_A_F_meta_SE, p_DT_A_F_meta_CI)
p_DT_A_F_meta
# run the analysis with metagen package
DT_A_M_metagen <- metagen(data = DT_A_effects %>% filter(Sex == "M"), TE = Y, seTE = SE, studlab = Study, sm = "SMD", fixed = FALSE, random = TRUE, method.tau = "DL")
DT_A_M_metagen <- update.meta(DT_A_M_metagen, subgroup = Population, tau.common = FALSE)
capture.output(summary(DT_A_M_metagen), file = "DevelopmentTime/DT_A_M_metagen_sum.txt")
DT_A_M_metagen
## Number of studies combined: k = 48
##
## SMD 95%-CI z p-value
## Random effects model 239.9937 [234.8615; 245.1259] 91.65 0
##
## Quantifying heterogeneity:
## tau^2 = 317.5457 [280.5629; 698.4731]; tau = 17.8198 [16.7500; 26.4286]
## I^2 = 98.6% [98.4%; 98.7%]; H = 8.37 [7.90; 8.87]
##
## Test of heterogeneity:
## Q d.f. p-value
## 3294.35 47 0
##
## Results for subgroups (random effects model):
## k SMD 95%-CI tau^2 tau Q
## Population = YE 5 231.3566 [222.3748; 240.3383] 94.7808 9.7355 77.48
## Population = RE 6 252.9210 [232.7427; 273.0992] 621.7322 24.9346 457.91
## Population = GI 5 239.3670 [231.3226; 247.4113] 70.4285 8.3922 48.53
## Population = MU 6 245.5219 [219.6757; 271.3680] 1033.4373 32.1471 1048.60
## Population = MA 5 233.9986 [225.7460; 242.2511] 78.5414 8.8624 66.63
## Population = UM 5 235.2384 [227.6374; 242.8395] 64.1779 8.0111 50.69
## Population = KA 5 229.4524 [224.0212; 234.8836] 29.4632 5.4280 27.59
## Population = VA 5 239.1019 [231.0362; 247.1675] 74.5193 8.6325 63.14
## Population = AK 6 246.2495 [218.6256; 273.8735] 1182.0341 34.3807 1213.95
## I^2
## Population = YE 94.8%
## Population = RE 98.9%
## Population = GI 91.8%
## Population = MU 99.5%
## Population = MA 94.0%
## Population = UM 92.1%
## Population = KA 85.5%
## Population = VA 93.7%
## Population = AK 99.6%
##
## Test for subgroup differences (random effects model):
## Q d.f. p-value
## Between groups 11.08 8 0.1972
##
## Details on meta-analytical method:
## - Inverse variance method
## - DerSimonian-Laird estimator for tau^2
## - Jackson method for confidence interval of tau^2 and tau
# run the analysis with EK's code for quick plotting
DT_A_M_meta <- metaAnalysisRandomModel(DT_A_effects %>% filter(Sex == "M"))
p_DT_A_M_meta_SE <- DT_A_M_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, SEMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = Mstar + SEMstar, xmin = Mstar - SEMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with SE") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", DT_A_M_meta$Qtest_het$Q),
hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", DT_A_M_meta$Qtest_het$p),
hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_DT_A_M_meta_CI <- DT_A_M_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, ULMstar, LLMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = ULMstar, xmin = LLMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with 95% CI") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", DT_A_M_meta$Qtest_het$Q),
hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", DT_A_M_meta$Qtest_het$p),
hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_DT_A_M_meta <- ggarrange(p_DT_A_M_meta_SE, p_DT_A_M_meta_CI)
p_DT_A_M_meta
DW_effects <- DW_fitted %>%
dplyr::select(-Value) %>%
mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")),
Lab = as.factor(Lab),
V = SE^2,
Study = paste(Population, Lab, sep = "_")) %>%
relocate(Population, Sex, Lab, Study) %>%
arrange(Population) %>%
dplyr::rename(Y = Estimate)
# run the analysis with metagen package
DW_F_metagen <- metagen(data = DW_effects %>% filter(Sex == "F"), TE = Y, seTE = SE, studlab = Study, sm = "SMD", fixed = FALSE, random = TRUE, method.tau = "DL")
DW_F_metagen <- update.meta(DW_F_metagen, subgroup = Population, tau.common = FALSE)
capture.output(summary(DW_F_metagen), file = "DryWeight/DW_F_metagen_sum.txt")
DW_F_metagen
## Number of studies combined: k = 27
##
## SMD 95%-CI z p-value
## Random effects model 0.4646 [0.4562; 0.4731] 107.39 0
##
## Quantifying heterogeneity:
## tau^2 = 0.0004 [0.0002; 0.0009]; tau = 0.0196 [0.0135; 0.0294]
## I^2 = 76.9% [66.8%; 84.0%]; H = 2.08 [1.73; 2.50]
##
## Test of heterogeneity:
## Q d.f. p-value
## 112.72 26 < 0.0001
##
## Results for subgroups (random effects model):
## k SMD 95%-CI tau^2 tau Q I^2
## Population = YE 3 0.4502 [0.4219; 0.4785] 0.0005 0.0226 11.01 81.8%
## Population = RE 3 0.4824 [0.4537; 0.5111] 0.0005 0.0225 9.59 79.2%
## Population = GI 3 0.4545 [0.4321; 0.4769] 0.0003 0.0160 5.77 65.3%
## Population = MU 3 0.4599 [0.4364; 0.4834] 0.0003 0.0179 7.78 74.3%
## Population = MA 3 0.4702 [0.4387; 0.5017] 0.0007 0.0257 13.79 85.5%
## Population = UM 3 0.4705 [0.4423; 0.4988] 0.0005 0.0223 9.98 80.0%
## Population = KA 3 0.4714 [0.4481; 0.4948] 0.0003 0.0177 7.54 73.5%
## Population = VA 3 0.4794 [0.4653; 0.4935] <0.0001 0.0066 2.78 27.9%
## Population = AK 3 0.4431 [0.4195; 0.4666] 0.0003 0.0179 7.76 74.2%
##
## Test for subgroup differences (random effects model):
## Q d.f. p-value
## Between groups 11.21 8 0.1903
##
## Details on meta-analytical method:
## - Inverse variance method
## - DerSimonian-Laird estimator for tau^2
## - Jackson method for confidence interval of tau^2 and tau
# run the analysis with EK's code for quick plotting
DW_F_meta <- metaAnalysisRandomModel(DW_effects %>% filter(Sex == "F"))
p_DW_F_meta_SE <- DW_F_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, SEMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = Mstar + SEMstar, xmin = Mstar - SEMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with SE") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", DW_F_meta$Qtest_het$Q),
hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", DW_F_meta$Qtest_het$p),
hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_DW_F_meta_CI <- DW_F_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, ULMstar, LLMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = ULMstar, xmin = LLMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with 95% CI") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", DW_F_meta$Qtest_het$Q),
hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", DW_F_meta$Qtest_het$p),
hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_DW_F_meta <- ggarrange(p_DW_F_meta_SE, p_DW_F_meta_CI)
p_DW_F_meta
# run the analysis with metagen package
DW_M_metagen <- metagen(data = DW_effects %>% filter(Sex == "M"), TE = Y, seTE = SE, studlab = Study, sm = "SMD", fixed = FALSE, random = TRUE, method.tau = "DL")
DW_M_metagen <- update.meta(DW_M_metagen, subgroup = Population, tau.common = FALSE)
capture.output(summary(DW_M_metagen), file = "DryWeight/DW_M_metagen_sum.txt")
DW_M_metagen
## Number of studies combined: k = 27
##
## SMD 95%-CI z p-value
## Random effects model 0.2661 [0.2629; 0.2693] 164.95 0
##
## Quantifying heterogeneity:
## tau^2 < 0.0001 [0.0000; 0.0001]; tau = 0.0060 [0.0000; 0.0096]
## I^2 = 53.6% [28.1%; 70.0%]; H = 1.47 [1.18; 1.83]
##
## Test of heterogeneity:
## Q d.f. p-value
## 56.01 26 0.0006
##
## Results for subgroups (random effects model):
## k SMD 95%-CI tau^2 tau Q I^2
## Population = YE 3 0.2547 [0.2454; 0.2640] <0.0001 0.0059 4.15 51.8%
## Population = RE 3 0.2717 [0.2648; 0.2785] 0 0 1.79 0.0%
## Population = GI 3 0.2595 [0.2521; 0.2669] <0.0001 0.0023 2.27 12.1%
## Population = MU 3 0.2690 [0.2629; 0.2752] 0 0 1.71 0.0%
## Population = MA 3 0.2702 [0.2640; 0.2764] 0 0 0.39 0.0%
## Population = UM 3 0.2713 [0.2647; 0.2778] 0 0 1.98 0.0%
## Population = KA 3 0.2731 [0.2638; 0.2824] <0.0001 0.0060 4.24 52.9%
## Population = VA 3 0.2684 [0.2623; 0.2746] 0 0 0.52 0.0%
## Population = AK 3 0.2595 [0.2533; 0.2656] 0 0 0.88 0.0%
##
## Test for subgroup differences (random effects model):
## Q d.f. p-value
## Between groups 23.04 8 0.0033
##
## Details on meta-analytical method:
## - Inverse variance method
## - DerSimonian-Laird estimator for tau^2
## - Jackson method for confidence interval of tau^2 and tau
# run the analysis with EK's code for quick plotting
DW_M_meta <- metaAnalysisRandomModel(DW_effects %>% filter(Sex == "M"))
p_DW_M_meta_SE <- DW_M_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, SEMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = Mstar + SEMstar, xmin = Mstar - SEMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with SE") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", DW_M_meta$Qtest_het$Q),
hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", DW_M_meta$Qtest_het$p),
hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_DW_M_meta_CI <- DW_M_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, ULMstar, LLMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = ULMstar, xmin = LLMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with 95% CI") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", DW_M_meta$Qtest_het$Q),
hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", DW_M_meta$Qtest_het$p),
hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_DW_M_meta <- ggarrange(p_DW_M_meta_SE, p_DW_M_meta_CI)
p_DW_M_meta
TL_effects <- TL_fitted %>%
dplyr::select(-Value) %>%
mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")),
Lab = as.factor(Lab),
V = SE^2,
Study = paste(Population, Lab, sep = "_")) %>%
relocate(Population, Sex, Lab, Study) %>%
arrange(Population) %>%
dplyr::rename(Y = Estimate)
# run the analysis with metagen package
TL_F_metagen <- metagen(data = TL_effects %>% filter(Sex == "F"), TE = Y, seTE = SE, studlab = Study, sm = "SMD", fixed = FALSE, random = TRUE, method.tau = "DL")
TL_F_metagen <- update.meta(TL_F_metagen, subgroup = Population, tau.common = FALSE)
capture.output(summary(TL_F_metagen), file = "ThoraxLength/TL_F_metagen_sum.txt")
TL_F_metagen
## Number of studies combined: k = 33
##
## SMD 95%-CI z p-value
## Random effects model 960.0832 [946.7718; 973.3945] 141.36 0
##
## Quantifying heterogeneity:
## tau^2 = 1324.6357 [1037.1888; 3338.0798]; tau = 36.3955 [32.2054; 57.7761]
## I^2 = 94.0% [92.5%; 95.2%]; H = 4.09 [3.66; 4.57]
##
## Test of heterogeneity:
## Q d.f. p-value
## 534.55 32 < 0.0001
##
## Results for subgroups (random effects model):
## k SMD 95%-CI tau^2 tau Q
## Population = YE 4 974.1657 [936.4268; 1011.9046] 1286.6997 35.8706 32.40
## Population = RE 3 969.1048 [896.5261; 1041.6834] 3935.7134 62.7353 65.54
## Population = GI 4 968.7977 [918.0887; 1019.5067] 2454.4199 49.5421 47.17
## Population = MU 4 947.3885 [892.5535; 1002.2235] 2861.4591 53.4926 70.74
## Population = MA 4 961.8267 [913.9376; 1009.7159] 2186.5918 46.7610 57.59
## Population = UM 3 955.5090 [893.8572; 1017.1608] 2794.5276 52.8633 48.68
## Population = KA 4 951.2364 [895.4286; 1007.0443] 3031.8513 55.0622 70.45
## Population = VA 3 959.1809 [904.6044; 1013.7574] 2170.5042 46.5887 49.62
## Population = AK 4 943.8390 [897.2902; 990.3877] 2047.5637 45.2500 56.53
## I^2
## Population = YE 90.7%
## Population = RE 96.9%
## Population = GI 93.6%
## Population = MU 95.8%
## Population = MA 94.8%
## Population = UM 95.9%
## Population = KA 95.7%
## Population = VA 96.0%
## Population = AK 94.7%
##
## Test for subgroup differences (random effects model):
## Q d.f. p-value
## Between groups 1.51 8 0.9926
##
## Details on meta-analytical method:
## - Inverse variance method
## - DerSimonian-Laird estimator for tau^2
## - Jackson method for confidence interval of tau^2 and tau
# run the analysis with EK's code for quick plotting
TL_F_meta <- metaAnalysisRandomModel(TL_effects %>% filter(Sex == "F"))
p_TL_F_meta_SE <- TL_F_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, SEMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = Mstar + SEMstar, xmin = Mstar - SEMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with SE") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", TL_F_meta$Qtest_het$Q),
hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", TL_F_meta$Qtest_het$p),
hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_TL_F_meta_CI <- TL_F_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, ULMstar, LLMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = ULMstar, xmin = LLMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with 95% CI") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", TL_F_meta$Qtest_het$Q),
hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", TL_F_meta$Qtest_het$p),
hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_TL_F_meta <- ggarrange(p_TL_F_meta_SE, p_TL_F_meta_CI)
p_TL_F_meta
# run the analysis with metagen package
TL_M_metagen <- metagen(data = TL_effects %>% filter(Sex == "M"), TE = Y, seTE = SE, studlab = Study, sm = "SMD", fixed = FALSE, random = TRUE, method.tau = "DL")
TL_M_metagen <- update.meta(TL_M_metagen, subgroup = Population, tau.common = FALSE)
capture.output(summary(TL_M_metagen), file = "ThoraxLength/TL_M_metagen_sum.txt")
TL_M_metagen
## Number of studies combined: k = 24
##
## SMD 95%-CI z p-value
## Random effects model 827.3092 [816.9626; 837.6559] 156.72 0
##
## Quantifying heterogeneity:
## tau^2 = 430.6821 [188.4353; 1136.5359]; tau = 20.7529 [13.7272; 33.7125]
## I^2 = 71.2% [56.6%; 80.9%]; H = 1.86 [1.52; 2.29]
##
## Test of heterogeneity:
## Q d.f. p-value
## 79.91 23 < 0.0001
##
## Results for subgroups (random effects model):
## k SMD 95%-CI tau^2 tau Q I^2
## Population = YE 3 840.4294 [824.7127; 856.1460] 0 0 1.76 0.0%
## Population = RE 2 833.0005 [777.0041; 888.9969] 1428.7483 37.7988 7.80 87.2%
## Population = GI 3 832.2111 [814.6964; 849.7258] 0 0 0.47 0.0%
## Population = MU 3 812.3640 [755.2846; 869.4435] 2189.1779 46.7887 17.69 88.7%
## Population = MA 3 830.8742 [782.2636; 879.4847] 1581.2339 39.7647 15.37 87.0%
## Population = UM 2 834.4763 [817.0744; 851.8782] 0 0 0.68 0.0%
## Population = KA 3 815.2189 [799.3232; 831.1145] 0 0 0.29 0.0%
## Population = VA 2 829.5396 [769.1055; 889.9737] 1719.1689 41.4629 10.04 90.0%
## Population = AK 3 814.4255 [777.2659; 851.5850] 816.1319 28.5680 8.81 77.3%
##
## Test for subgroup differences (random effects model):
## Q d.f. p-value
## Between groups 6.36 8 0.6069
##
## Details on meta-analytical method:
## - Inverse variance method
## - DerSimonian-Laird estimator for tau^2
## - Jackson method for confidence interval of tau^2 and tau
# run the analysis with EK's code for quick plotting
TL_M_meta <- metaAnalysisRandomModel(TL_effects %>% filter(Sex == "M"))
p_TL_M_meta_SE <- TL_M_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, SEMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = Mstar + SEMstar, xmin = Mstar - SEMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with SE") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", TL_M_meta$Qtest_het$Q),
hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", TL_M_meta$Qtest_het$p),
hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_TL_M_meta_CI <- TL_M_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, ULMstar, LLMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = ULMstar, xmin = LLMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with 95% CI") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", TL_M_meta$Qtest_het$Q),
hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", TL_M_meta$Qtest_het$p),
hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_TL_M_meta <- ggarrange(p_TL_M_meta_SE, p_TL_M_meta_CI)
p_TL_M_meta
WA_L_effects <- WA_L_fitted %>%
dplyr::select(-Value) %>%
mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")),
Lab = as.factor(Lab),
V = SE^2,
Study = paste(Population, Lab, sep = "_")) %>%
relocate(Population, Sex, Lab, Study) %>%
arrange(Population) %>%
dplyr::rename(Y = Estimate)
# run the analysis with metagen package
WA_L_F_metagen <- metagen(data = WA_L_effects %>% filter(Sex == "F"), TE = Y, seTE = SE, studlab = Study, sm = "SMD", fixed = FALSE, random = TRUE, method.tau = "DL")
WA_L_F_metagen <- update.meta(WA_L_F_metagen, subgroup = Population, tau.common = FALSE)
capture.output(summary(WA_L_F_metagen), file = "WingArea/WA_L_F_metagen_sum.txt")
WA_L_F_metagen
## Number of studies combined: k = 36
##
## SMD 95%-CI z p-value
## Random effects model 2800.8679 [2777.4594; 2824.2765] 234.51 0
##
## Quantifying heterogeneity:
## tau^2 = 3690.5541 [3973.3996; 13050.5557]; tau = 60.7499 [63.0349; 114.2390]
## I^2 = 88.2% [84.7%; 90.9%]; H = 2.91 [2.56; 3.32]
##
## Test of heterogeneity:
## Q d.f. p-value
## 296.72 35 < 0.0001
##
## Results for subgroups (random effects model):
## k SMD 95%-CI tau^2 tau Q
## Population = YE 4 2791.3037 [2742.4298; 2840.1776] 1392.4646 37.3157 9.15
## Population = RE 4 2888.4516 [2822.3545; 2954.5487] 3148.0819 56.1078 15.91
## Population = GI 4 2769.3180 [2688.7777; 2849.8582] 5329.8130 73.0056 23.35
## Population = MU 4 2779.4302 [2696.0266; 2862.8337] 5691.8809 75.4446 29.16
## Population = MA 4 2831.2333 [2760.7056; 2901.7610] 3722.2356 61.0101 18.23
## Population = UM 4 2847.0409 [2778.5889; 2915.4929] 3459.4232 58.8169 17.79
## Population = KA 4 2779.6403 [2711.7830; 2847.4976] 3318.5528 57.6069 18.05
## Population = VA 4 2766.8715 [2682.9543; 2850.7888] 5774.5174 75.9902 29.24
## Population = AK 4 2753.0461 [2689.0424; 2817.0499] 2851.7529 53.4018 16.00
## I^2
## Population = YE 67.2%
## Population = RE 81.1%
## Population = GI 87.1%
## Population = MU 89.7%
## Population = MA 83.5%
## Population = UM 83.1%
## Population = KA 83.4%
## Population = VA 89.7%
## Population = AK 81.2%
##
## Test for subgroup differences (random effects model):
## Q d.f. p-value
## Between groups 13.33 8 0.1010
##
## Details on meta-analytical method:
## - Inverse variance method
## - DerSimonian-Laird estimator for tau^2
## - Jackson method for confidence interval of tau^2 and tau
# run the analysis with EK's code for quick plotting
WA_L_F_meta <- metaAnalysisRandomModel(WA_L_effects %>% filter(Sex == "F"))
p_WA_L_F_meta_SE <- WA_L_F_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, SEMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = Mstar + SEMstar, xmin = Mstar - SEMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with SE") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", WA_L_F_meta$Qtest_het$Q),
hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", WA_L_F_meta$Qtest_het$p),
hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_WA_L_F_meta_CI <- WA_L_F_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, ULMstar, LLMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = ULMstar, xmin = LLMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) + labs(x = "Summary effect", title = "Pop. summary effect with 95% CI") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", WA_L_F_meta$Qtest_het$Q),
hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", WA_L_F_meta$Qtest_het$p),
hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_WA_L_F_meta <- ggarrange(p_WA_L_F_meta_SE, p_WA_L_F_meta_CI)
p_WA_L_F_meta
# run the analysis with metagen package
WA_L_M_metagen <- metagen(data = WA_L_effects %>% filter(Sex == "M"), TE = Y, seTE = SE, studlab = Study, sm = "SMD", fixed = FALSE, random = TRUE, method.tau = "DL")
WA_L_M_metagen <- update.meta(WA_L_M_metagen, subgroup = Population, tau.common = FALSE)
capture.output(summary(WA_L_M_metagen), file = "WingArea/WA_L_M_metagen_sum.txt")
WA_L_M_metagen
## Number of studies combined: k = 36
##
## SMD 95%-CI z p-value
## Random effects model 2453.1892 [2437.3661; 2469.0123] 303.87 0
##
## Quantifying heterogeneity:
## tau^2 = 1554.6292 [1332.3102; 4689.5239]; tau = 39.4288 [36.5008; 68.4801]
## I^2 = 82.9% [77.2%; 87.2%]; H = 2.42 [2.09; 2.80]
##
## Test of heterogeneity:
## Q d.f. p-value
## 205.12 35 < 0.0001
##
## Results for subgroups (random effects model):
## k SMD 95%-CI tau^2 tau Q
## Population = YE 4 2436.6686 [2413.4651; 2459.8721] 154.6226 12.4347 4.14
## Population = RE 4 2510.8246 [2466.2599; 2555.3892] 1304.8650 36.1229 11.78
## Population = GI 4 2457.5696 [2425.6232; 2489.5159] 456.7954 21.3728 5.73
## Population = MU 4 2434.6340 [2383.6494; 2485.6185] 1895.7661 43.5404 17.68
## Population = MA 4 2485.8104 [2452.7715; 2518.8492] 540.4270 23.2471 6.64
## Population = UM 4 2490.2166 [2449.2856; 2531.1477] 1038.1156 32.2198 10.37
## Population = KA 4 2435.2452 [2392.8096; 2477.6808] 1163.5061 34.1102 12.04
## Population = VA 4 2452.5836 [2413.4794; 2491.6878] 925.1614 30.4165 10.07
## Population = AK 4 2417.1283 [2379.3148; 2454.9417] 820.0968 28.6373 9.28
## I^2
## Population = YE 27.5%
## Population = RE 74.5%
## Population = GI 47.7%
## Population = MU 83.0%
## Population = MA 54.8%
## Population = UM 71.1%
## Population = KA 75.1%
## Population = VA 70.2%
## Population = AK 67.7%
##
## Test for subgroup differences (random effects model):
## Q d.f. p-value
## Between groups 19.95 8 0.0105
##
## Details on meta-analytical method:
## - Inverse variance method
## - DerSimonian-Laird estimator for tau^2
## - Jackson method for confidence interval of tau^2 and tau
# run the analysis with EK's code for quick plotting
WA_L_M_meta <- metaAnalysisRandomModel(WA_L_effects %>% filter(Sex == "M"))
p_WA_L_M_meta_SE <- WA_L_M_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, SEMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = Mstar + SEMstar, xmin = Mstar - SEMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with SE") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", WA_L_M_meta$Qtest_het$Q),
hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", WA_L_M_meta$Qtest_het$p),
hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_WA_L_M_meta_CI <- WA_L_M_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, ULMstar, LLMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = ULMstar, xmin = LLMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with 95% CI") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", WA_L_M_meta$Qtest_het$Q),
hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", WA_L_M_meta$Qtest_het$p),
hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_WA_L_M_meta <- ggarrange(p_WA_L_M_meta_SE, p_WA_L_M_meta_CI)
p_WA_L_M_meta
WA_R_effects <- WA_R_fitted %>%
dplyr::select(-Value) %>%
mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")),
Lab = as.factor(Lab),
V = SE^2,
Study = paste(Population, Lab, sep = "_")) %>%
relocate(Population, Sex, Lab, Study) %>%
arrange(Population) %>%
dplyr::rename(Y = Estimate)
# run the analysis with metagen package
WA_R_F_metagen <- metagen(data = WA_R_effects %>% filter(Sex == "F"), TE = Y, seTE = SE, studlab = Study, sm = "SMD", fixed = FALSE, random = TRUE, method.tau = "DL")
WA_R_F_metagen <- update.meta(WA_R_F_metagen, subgroup = Population, tau.common = FALSE)
capture.output(summary(WA_R_F_metagen), file = "WingArea/WA_R_F_metagen_sum.txt")
WA_R_F_metagen
## Number of studies combined: k = 36
##
## SMD 95%-CI z p-value
## Random effects model 2804.3284 [2780.8876; 2827.7692] 234.48 0
##
## Quantifying heterogeneity:
## tau^2 = 3712.2491 [3978.0522; 13037.7622]; tau = 60.9282 [63.0718; 114.1830]
## I^2 = 88.4% [84.9%; 91.0%]; H = 2.93 [2.57; 3.34]
##
## Test of heterogeneity:
## Q d.f. p-value
## 300.76 35 < 0.0001
##
## Results for subgroups (random effects model):
## k SMD 95%-CI tau^2 tau Q
## Population = YE 4 2794.0556 [2745.8689; 2842.2422] 1344.1037 36.6620 9.07
## Population = RE 4 2891.1551 [2825.2956; 2957.0147] 3127.1890 55.9213 16.10
## Population = GI 4 2775.6368 [2700.5171; 2850.7564] 4493.1225 67.0308 20.46
## Population = MU 4 2784.8949 [2702.7552; 2867.0346] 5494.3336 74.1238 28.89
## Population = MA 4 2836.0644 [2765.7257; 2906.4032] 3705.3807 60.8718 18.47
## Population = UM 4 2852.1207 [2783.1491; 2921.0922] 3536.3308 59.4671 18.47
## Population = KA 4 2783.7269 [2716.7682; 2850.6855] 3214.8042 56.6992 17.95
## Population = VA 4 2770.7951 [2688.3713; 2853.2190] 5537.9221 74.4172 28.80
## Population = AK 4 2753.1090 [2688.0545; 2818.1635] 2983.7256 54.6235 16.95
## I^2
## Population = YE 66.9%
## Population = RE 81.4%
## Population = GI 85.3%
## Population = MU 89.6%
## Population = MA 83.8%
## Population = UM 83.8%
## Population = KA 83.3%
## Population = VA 89.6%
## Population = AK 82.3%
##
## Test for subgroup differences (random effects model):
## Q d.f. p-value
## Between groups 13.62 8 0.0922
##
## Details on meta-analytical method:
## - Inverse variance method
## - DerSimonian-Laird estimator for tau^2
## - Jackson method for confidence interval of tau^2 and tau
# run the analysis with EK's code for quick plotting
WA_R_F_meta <- metaAnalysisRandomModel(WA_R_effects %>% filter(Sex == "F"))
p_WA_R_F_meta_SE <- WA_R_F_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, SEMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = Mstar + SEMstar, xmin = Mstar - SEMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with SE") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", WA_R_F_meta$Qtest_het$Q),
hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", WA_R_F_meta$Qtest_het$p),
hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_WA_R_F_meta_CI <- WA_R_F_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, ULMstar, LLMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = ULMstar, xmin = LLMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with 95% CI") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", WA_R_F_meta$Qtest_het$Q),
hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", WA_R_F_meta$Qtest_het$p),
hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_WA_R_F_meta <- ggarrange(p_WA_R_F_meta_SE, p_WA_R_F_meta_CI)
p_WA_R_F_meta
# run the analysis with metagen package
WA_R_M_metagen <- metagen(data = WA_R_effects %>% filter(Sex == "M"), TE = Y, seTE = SE, studlab = Study, sm = "SMD", fixed = FALSE, random = TRUE, method.tau = "DL")
WA_R_M_metagen <- update.meta(WA_R_M_metagen, subgroup = Population, tau.common = FALSE)
capture.output(summary(WA_R_M_metagen), file = "WingArea/WA_R_M_metagen_sum.txt")
WA_R_M_metagen
## Number of studies combined: k = 36
##
## SMD 95%-CI z p-value
## Random effects model 2457.1161 [2441.2244; 2473.0078] 303.04 0
##
## Quantifying heterogeneity:
## tau^2 = 1571.1467 [1357.0746; 4762.2285]; tau = 39.6377 [36.8385; 69.0089]
## I^2 = 83.0% [77.2%; 87.2%]; H = 2.42 [2.10; 2.80]
##
## Test of heterogeneity:
## Q d.f. p-value
## 205.34 35 < 0.0001
##
## Results for subgroups (random effects model):
## k SMD 95%-CI tau^2 tau Q
## Population = YE 4 2438.9400 [2415.8051; 2462.0748] 151.3581 12.3028 4.11
## Population = RE 4 2516.9424 [2473.3365; 2560.5484] 1226.9858 35.0284 11.21
## Population = GI 4 2461.1887 [2433.3782; 2488.9991] 267.7837 16.3641 4.59
## Population = MU 4 2442.1341 [2393.7544; 2490.5138] 1652.2214 40.6475 15.77
## Population = MA 4 2488.7826 [2456.3000; 2521.2652] 510.3641 22.5912 6.42
## Population = UM 4 2494.9835 [2453.6122; 2536.3548] 1068.4866 32.6877 10.55
## Population = KA 4 2439.1817 [2395.5320; 2482.8313] 1255.7049 35.4359 12.75
## Population = VA 4 2455.4881 [2416.3765; 2494.5997] 925.0574 30.4148 10.06
## Population = AK 4 2418.3341 [2378.6557; 2458.0124] 938.6895 30.6380 10.19
## I^2
## Population = YE 27.0%
## Population = RE 73.2%
## Population = GI 34.6%
## Population = MU 81.0%
## Population = MA 53.2%
## Population = UM 71.6%
## Population = KA 76.5%
## Population = VA 70.2%
## Population = AK 70.5%
##
## Test for subgroup differences (random effects model):
## Q d.f. p-value
## Between groups 21.15 8 0.0067
##
## Details on meta-analytical method:
## - Inverse variance method
## - DerSimonian-Laird estimator for tau^2
## - Jackson method for confidence interval of tau^2 and tau
# run the analysis with EK's code for quick plotting
WA_R_M_meta <- metaAnalysisRandomModel(WA_R_effects %>% filter(Sex == "M"))
p_WA_R_M_meta_SE <- WA_R_M_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, SEMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = Mstar + SEMstar, xmin = Mstar - SEMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with SE") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", WA_R_M_meta$Qtest_het$Q),
hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", WA_R_M_meta$Qtest_het$p),
hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_WA_R_M_meta_CI <- WA_R_M_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, ULMstar, LLMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = ULMstar, xmin = LLMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with 95% CI") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", WA_R_M_meta$Qtest_het$Q),
hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", WA_R_M_meta$Qtest_het$p),
hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_WA_R_M_meta <- ggarrange(p_WA_R_M_meta_SE, p_WA_R_M_meta_CI)
p_WA_R_M_meta
Fec_effects <- Fec_fitted %>%
dplyr::select(-Value) %>%
mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")),
Lab = as.factor(Lab),
V = SE^2,
Study = paste(Population, Lab, sep = "_")) %>%
relocate(Population, Sex, Lab, Study) %>%
arrange(Population) %>%
dplyr::rename(Y = Estimate)
# run the analysis with metagen package
Fec_metagen <- metagen(data = Fec_effects %>% filter(Sex == "NA"), TE = Y, seTE = SE, studlab = Study, sm = "SMD", fixed = FALSE, random = TRUE, method.tau = "DL")
Fec_metagen <- update.meta(Fec_metagen, subgroup = Population, tau.common = FALSE)
capture.output(summary(Fec_metagen), file = "WingArea/Fec_metagen_sum.txt")
Fec_metagen
## Number of studies combined: k = 18
##
## SMD 95%-CI z p-value
## Random effects model 70.1795 [61.1053; 79.2538] 15.16 < 0.0001
##
## Quantifying heterogeneity:
## tau^2 = 316.4696 [169.2196; 883.0771]; tau = 17.7896 [13.0084; 29.7166]
## I^2 = 83.5% [75.2%; 89.1%]; H = 2.46 [2.01; 3.02]
##
## Test of heterogeneity:
## Q d.f. p-value
## 103.20 17 < 0.0001
##
## Results for subgroups (random effects model):
## k SMD 95%-CI tau^2 tau Q I^2
## Population = YE 2 56.6295 [46.1185; 67.1405] 0 0 0.96 0.0%
## Population = RE 2 60.6816 [48.7946; 72.5686] 0 0 0.63 0.0%
## Population = GI 2 61.1849 [38.0683; 84.3016] 198.8189 14.1003 3.42 70.8%
## Population = MU 2 74.7237 [38.5098; 110.9375] 615.7878 24.8151 10.08 90.1%
## Population = MA 2 76.9132 [34.6604; 119.1660] 860.4953 29.3342 13.33 92.5%
## Population = UM 2 74.3382 [19.6394; 129.0370] 1479.4131 38.4631 19.73 94.9%
## Population = KA 2 80.0387 [22.0330; 138.0445] 1688.4587 41.0909 27.58 96.4%
## Population = VA 2 69.5147 [37.7343; 101.2951] 463.3340 21.5252 8.33 88.0%
## Population = AK 2 78.5449 [43.2876; 113.8023] 582.8642 24.1426 9.98 90.0%
##
## Test for subgroup differences (random effects model):
## Q d.f. p-value
## Between groups 3.61 8 0.8902
##
## Details on meta-analytical method:
## - Inverse variance method
## - DerSimonian-Laird estimator for tau^2
## - Jackson method for confidence interval of tau^2 and tau
# run the analysis with EK's code for quick plotting
Fec_meta <- metaAnalysisRandomModel(Fec_effects %>% filter(Sex == "NA"))
p_Fec_meta_SE <- Fec_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, SEMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = Mstar + SEMstar, xmin = Mstar - SEMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with SE") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", Fec_meta$Qtest_het$Q),
hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", Fec_meta$Qtest_het$p),
hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_Fec_meta_CI <- Fec_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, ULMstar, LLMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = ULMstar, xmin = LLMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with 95% CI") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", Fec_meta$Qtest_het$Q),
hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", Fec_meta$Qtest_het$p),
hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_Fec_meta <- ggarrange(p_Fec_meta_SE, p_Fec_meta_CI)
p_Fec_meta
LS_effects <- LS_fitted %>%
dplyr::select(-Value) %>%
mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")),
Lab = as.factor(Lab),
V = SE^2,
Study = paste(Population, Lab, sep = "_")) %>%
relocate(Population, Sex, Lab, Study) %>%
arrange(Population) %>%
dplyr::rename(Y = Estimate)
# run the analysis with metagen package
LS_F_metagen <- metagen(data = LS_effects %>% filter(Sex == "F"), TE = Y, seTE = SE, studlab = Study, sm = "SMD", fixed = FALSE, random = TRUE, method.tau = "DL")
LS_F_metagen <- update.meta(LS_F_metagen, subgroup = Population, tau.common = FALSE)
capture.output(summary(LS_F_metagen), file = "Lifespan/LS_F_metagen_sum.txt")
LS_F_metagen
## Number of studies combined: k = 27
##
## SMD 95%-CI z p-value
## Random effects model 49.5126 [47.1345; 51.8907] 40.81 0
##
## Quantifying heterogeneity:
## tau^2 = 35.7209 [19.9491; 71.9771]; tau = 5.9767 [4.4664; 8.4839]
## I^2 = 95.0% [93.7%; 96.1%]; H = 4.48 [3.99; 5.04]
##
## Test of heterogeneity:
## Q d.f. p-value
## 522.79 26 < 0.0001
##
## Results for subgroups (random effects model):
## k SMD 95%-CI tau^2 tau Q I^2
## Population = YE 3 48.2235 [41.6119; 54.8351] 30.2032 5.4957 23.22 91.4%
## Population = RE 3 45.4036 [43.8697; 46.9375] 0 0 0.62 0.0%
## Population = GI 3 46.5748 [40.9487; 52.2010] 20.6103 4.5399 14.55 86.3%
## Population = MU 3 51.7848 [42.3130; 61.2566] 65.9619 8.1217 48.17 95.8%
## Population = MA 3 47.2862 [42.3160; 52.2564] 15.5781 3.9469 12.91 84.5%
## Population = UM 3 46.6874 [38.0726; 55.3023] 53.8217 7.3363 38.27 94.8%
## Population = KA 3 52.8596 [46.5610; 59.1581] 27.0879 5.2046 21.07 90.5%
## Population = VA 3 52.1671 [43.5001; 60.8341] 54.6033 7.3894 40.25 95.0%
## Population = AK 3 54.4827 [43.1011; 65.8643] 97.0692 9.8524 71.88 97.2%
##
## Test for subgroup differences (random effects model):
## Q d.f. p-value
## Between groups 10.96 8 0.2040
##
## Details on meta-analytical method:
## - Inverse variance method
## - DerSimonian-Laird estimator for tau^2
## - Jackson method for confidence interval of tau^2 and tau
# run the analysis with EK's code for quick plotting
LS_F_meta <- metaAnalysisRandomModel(LS_effects %>% filter(Sex == "F"))
p_LS_F_meta_SE <- LS_F_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, SEMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = Mstar + SEMstar, xmin = Mstar - SEMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with SE") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", LS_F_meta$Qtest_het$Q),
hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", LS_F_meta$Qtest_het$p),
hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_LS_F_meta_CI <- LS_F_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, ULMstar, LLMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = ULMstar, xmin = LLMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with 95% CI") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", LS_F_meta$Qtest_het$Q),
hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", LS_F_meta$Qtest_het$p),
hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_LS_F_meta <- ggarrange(p_LS_F_meta_SE, p_LS_F_meta_CI)
p_LS_F_meta
# run the analysis with metagen package
LS_M_metagen <- metagen(data = LS_effects %>% filter(Sex == "M"), TE = Y, seTE = SE, studlab = Study, sm = "SMD", fixed = FALSE, random = TRUE, method.tau = "DL")
LS_M_metagen <- update.meta(LS_M_metagen, subgroup = Population, tau.common = FALSE)
capture.output(summary(LS_M_metagen), file = "Lifespan/LS_M_metagen_sum.txt")
LS_M_metagen
## Number of studies combined: k = 27
##
## SMD 95%-CI z p-value
## Random effects model 52.0083 [50.7576; 53.2590] 81.50 0
##
## Quantifying heterogeneity:
## tau^2 = 8.5327 [6.3041; 24.3995]; tau = 2.9211 [2.5108; 4.9396]
## I^2 = 84.3% [78.2%; 88.7%]; H = 2.52 [2.14; 2.97]
##
## Test of heterogeneity:
## Q d.f. p-value
## 165.46 26 < 0.0001
##
## Results for subgroups (random effects model):
## k SMD 95%-CI tau^2 tau Q I^2
## Population = YE 3 49.5429 [44.4855; 54.6003] 17.4778 4.1806 18.00 88.9%
## Population = RE 3 49.9381 [48.5232; 51.3530] 0 0 1.26 0.0%
## Population = GI 3 50.3927 [48.7202; 52.0652] 0.3588 0.5990 2.28 12.4%
## Population = MU 3 54.8573 [50.9592; 58.7553] 9.4434 3.0730 10.61 81.1%
## Population = MA 3 50.6985 [47.1443; 54.2528] 7.4838 2.7357 8.86 77.4%
## Population = UM 3 50.9024 [44.4279; 57.3768] 30.1193 5.4881 28.55 93.0%
## Population = KA 3 55.6251 [54.0750; 57.1753] 0.2287 0.4782 2.21 9.5%
## Population = VA 3 53.4606 [48.6456; 58.2756] 15.6045 3.9503 16.11 87.6%
## Population = AK 3 53.9160 [49.0280; 58.8039] 16.2146 4.0267 17.17 88.4%
##
## Test for subgroup differences (random effects model):
## Q d.f. p-value
## Between groups 37.25 8 < 0.0001
##
## Details on meta-analytical method:
## - Inverse variance method
## - DerSimonian-Laird estimator for tau^2
## - Jackson method for confidence interval of tau^2 and tau
# run the analysis with EK's code for quick plotting
LS_M_meta <- metaAnalysisRandomModel(LS_effects %>% filter(Sex == "M"))
p_LS_M_meta_SE <- LS_M_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, SEMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = Mstar + SEMstar, xmin = Mstar - SEMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with SE") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", LS_M_meta$Qtest_het$Q), hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", LS_M_meta$Qtest_het$p), hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_LS_M_meta_CI <- LS_M_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, ULMstar, LLMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = ULMstar, xmin = LLMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with 95% CI") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", LS_M_meta$Qtest_het$Q), hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", LS_M_meta$Qtest_het$p), hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_LS_M_meta <- ggarrange(p_LS_M_meta_SE, p_LS_M_meta_CI)
p_LS_M_meta
CSM_effects <- CSM_fitted %>%
dplyr::select(-Value) %>%
mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")),
Lab = as.factor(Lab),
V = SE^2,
Study = paste(Population, Lab, sep = "_")) %>%
relocate(Population, Sex, Lab, Study) %>%
arrange(Population) %>%
dplyr::rename(Y = Estimate)
# run the analysis with metagen package
CSM_F_metagen <- metagen(data = CSM_effects %>% filter(Sex == "F"), TE = Y, seTE = SE, studlab = Study, sm = "SMD", fixed = FALSE, random = TRUE, method.tau = "DL")
CSM_F_metagen <- update.meta(CSM_F_metagen, subgroup = Population, tau.common = FALSE)
capture.output(summary(CSM_F_metagen), file = "ColdShock/CSM_F_metagen_sum.txt")
CSM_F_metagen
## Number of studies combined: k = 27
##
## SMD 95%-CI z p-value
## Random effects model 0.8055 [0.7715; 0.8396] 46.34 0
##
## Quantifying heterogeneity:
## tau^2 = 0.0052 [0.0073; 0.0289]; tau = 0.0719 [0.0852; 0.1701]
## I^2 = 75.1% [63.9%; 82.9%]; H = 2.01 [1.66; 2.42]
##
## Test of heterogeneity:
## Q d.f. p-value
## 104.61 26 < 0.0001
##
## Results for subgroups (random effects model):
## k SMD 95%-CI tau^2 tau Q I^2
## Population = YE 3 0.8187 [0.7055; 0.9318] 0.0068 0.0827 8.89 77.5%
## Population = RE 3 0.7911 [0.6714; 0.9109] 0.0077 0.0878 8.63 76.8%
## Population = GI 3 0.7701 [0.6566; 0.8836] 0.0064 0.0803 7.02 71.5%
## Population = MU 3 0.8197 [0.7041; 0.9353] 0.0073 0.0853 9.35 78.6%
## Population = MA 3 0.7891 [0.6670; 0.9113] 0.0084 0.0915 10.49 80.9%
## Population = UM 3 0.7284 [0.6133; 0.8435] 0.0070 0.0834 8.21 75.6%
## Population = KA 3 0.7907 [0.6497; 0.9316] 0.0117 0.1084 13.00 84.6%
## Population = VA 3 0.8010 [0.6536; 0.9484] 0.0133 0.1155 15.39 87.0%
## Population = AK 3 0.8359 [0.7347; 0.9370] 0.0052 0.0720 7.42 73.0%
##
## Test for subgroup differences (random effects model):
## Q d.f. p-value
## Between groups 2.47 8 0.9633
##
## Details on meta-analytical method:
## - Inverse variance method
## - DerSimonian-Laird estimator for tau^2
## - Jackson method for confidence interval of tau^2 and tau
# run the analysis with EK's code for quick plotting
CSM_F_meta <- metaAnalysisRandomModel(CSM_effects %>% filter(Sex == "F"))
p_CSM_F_meta_SE <- CSM_F_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, SEMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = Mstar + SEMstar, xmin = Mstar - SEMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with SE") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", CSM_F_meta$Qtest_het$Q), hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", CSM_F_meta$Qtest_het$p), hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_CSM_F_meta_CI <- CSM_F_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, ULMstar, LLMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = ULMstar, xmin = LLMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with 95% CI") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", CSM_F_meta$Qtest_het$Q), hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", CSM_F_meta$Qtest_het$p), hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_CSM_F_meta <- ggarrange(p_CSM_F_meta_SE, p_CSM_F_meta_CI)
p_CSM_F_meta
# run the analysis with metagen package
CSM_M_metagen <- metagen(data = CSM_effects %>% filter(Sex == "M"), TE = Y, seTE = SE, studlab = Study, sm = "SMD", fixed = FALSE, random = TRUE, method.tau = "DL")
CSM_M_metagen <- update.meta(CSM_M_metagen, subgroup = Population, tau.common = FALSE)
capture.output(summary(CSM_M_metagen), file = "ColdShock/CSM_M_metagen_sum.txt")
CSM_M_metagen
## Number of studies combined: k = 27
##
## SMD 95%-CI z p-value
## Random effects model 0.7004 [0.6629; 0.7379] 36.59 < 0.0001
##
## Quantifying heterogeneity:
## tau^2 = 0.0045 [0.0000; 0.0108]; tau = 0.0674 [0.0000; 0.1038]
## I^2 = 49.2% [20.7%; 67.5%]; H = 1.40 [1.12; 1.75]
##
## Test of heterogeneity:
## Q d.f. p-value
## 51.21 26 0.0022
##
## Results for subgroups (random effects model):
## k SMD 95%-CI tau^2 tau Q I^2
## Population = YE 3 0.8047 [0.6746; 0.9347] 0.0077 0.0876 4.94 59.5%
## Population = RE 3 0.6870 [0.5739; 0.8001] 0.0042 0.0646 3.43 41.7%
## Population = GI 3 0.7004 [0.6171; 0.7837] 0 0 1.56 0.0%
## Population = MU 3 0.7189 [0.5245; 0.9132] 0.0237 0.1540 11.36 82.4%
## Population = MA 3 0.6852 [0.6093; 0.7611] 0 0 1.77 0.0%
## Population = UM 3 0.6281 [0.5343; 0.7220] 0.0019 0.0433 2.69 25.7%
## Population = KA 3 0.7065 [0.6306; 0.7824] 0 0 1.12 0.0%
## Population = VA 3 0.6823 [0.5300; 0.8346] 0.0125 0.1120 6.88 70.9%
## Population = AK 3 0.6796 [0.5797; 0.7794] 0.0031 0.0553 3.26 38.6%
##
## Test for subgroup differences (random effects model):
## Q d.f. p-value
## Between groups 5.03 8 0.7546
##
## Details on meta-analytical method:
## - Inverse variance method
## - DerSimonian-Laird estimator for tau^2
## - Jackson method for confidence interval of tau^2 and tau
# run the analysis with EK's code for quick plotting
CSM_M_meta <- metaAnalysisRandomModel(CSM_effects %>% filter(Sex == "M"))
p_CSM_M_meta_SE <- CSM_M_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, SEMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = Mstar + SEMstar, xmin = Mstar - SEMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with SE") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", CSM_M_meta$Qtest_het$Q), hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", CSM_M_meta$Qtest_het$p), hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_CSM_M_meta_CI <- CSM_M_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, ULMstar, LLMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = ULMstar, xmin = LLMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with 95% CI") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", CSM_M_meta$Qtest_het$Q), hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", CSM_M_meta$Qtest_het$p), hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_CSM_M_meta <- ggarrange(p_CSM_M_meta_SE, p_CSM_M_meta_CI)
p_CSM_M_meta
HSM_effects <- HSM_fitted %>%
dplyr::select(-Value) %>%
mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")),
Lab = as.factor(Lab),
V = SE^2,
Study = paste(Population, Lab, sep = "_")) %>%
relocate(Population, Sex, Lab, Study) %>%
arrange(Population) %>%
dplyr::rename(Y = Estimate)
# run the analysis with metagen package
HSM_F_metagen <- metagen(data = HSM_effects %>% filter(Sex == "F"), TE = Y, seTE = SE, studlab = Study, sm = "SMD", fixed = FALSE, random = TRUE, method.tau = "DL")
HSM_F_metagen <- update.meta(HSM_F_metagen, subgroup = Population, tau.common = FALSE)
capture.output(summary(HSM_F_metagen), file = "HeatShock/HSM_F_metagen_sum.txt")
HSM_F_metagen
## Number of studies combined: k = 18
##
## SMD 95%-CI z p-value
## Random effects model 361.3025 [351.9100; 370.6949] 75.39 0
##
## Quantifying heterogeneity:
## tau^2 = 237.8482 [117.8599; 1004.1068]; tau = 15.4223 [10.8563; 31.6876]
## I^2 = 77.6% [65.1%; 85.7%]; H = 2.11 [1.69; 2.64]
##
## Test of heterogeneity:
## Q d.f. p-value
## 76.04 17 < 0.0001
##
## Results for subgroups (random effects model):
## k SMD 95%-CI tau^2 tau Q I^2
## Population = YE 2 342.6754 [294.8420; 390.5088] 943.5247 30.7168 4.06 75.3%
## Population = RE 2 355.3141 [303.4415; 407.1867] 1133.9239 33.6738 4.55 78.0%
## Population = GI 2 334.2288 [321.8623; 346.5953] 0 0 0.02 0.0%
## Population = MU 2 361.8072 [295.4423; 428.1721] 2011.6901 44.8519 7.35 86.4%
## Population = MA 2 391.0997 [344.1103; 438.0891] 888.9120 29.8146 3.66 72.6%
## Population = UM 2 369.8067 [347.2564; 392.3570] 125.9058 11.2208 1.37 27.1%
## Population = KA 2 364.2032 [352.7194; 375.6869] 0 0 0.05 0.0%
## Population = VA 2 360.0392 [344.1934; 375.8850] 41.7888 6.4644 1.12 11.0%
## Population = AK 2 368.9146 [344.4671; 393.3620] 160.9033 12.6848 1.49 32.7%
##
## Test for subgroup differences (random effects model):
## Q d.f. p-value
## Between groups 19.10 8 0.0144
##
## Details on meta-analytical method:
## - Inverse variance method
## - DerSimonian-Laird estimator for tau^2
## - Jackson method for confidence interval of tau^2 and tau
# run the analysis with EK's code for quick plotting
HSM_F_meta <- metaAnalysisRandomModel(HSM_effects %>% filter(Sex == "F"))
p_HSM_F_meta_SE <- HSM_F_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, SEMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = Mstar + SEMstar, xmin = Mstar - SEMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with SE") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", HSM_F_meta$Qtest_het$Q),
hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", HSM_F_meta$Qtest_het$p),
hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_HSM_F_meta_CI <- HSM_F_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, ULMstar, LLMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = ULMstar, xmin = LLMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with 95% CI") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", HSM_F_meta$Qtest_het$Q),
hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", HSM_F_meta$Qtest_het$p),
hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_HSM_F_meta <- ggarrange(p_HSM_F_meta_SE, p_HSM_F_meta_CI)
p_HSM_F_meta
# run the analysis with metagen package
HSM_M_metagen <- metagen(data = HSM_effects %>% filter(Sex == "M"), TE = Y, seTE = SE, studlab = Study, sm = "SMD", fixed = FALSE, random = TRUE, method.tau = "DL")
HSM_M_metagen <- update.meta(HSM_M_metagen, subgroup = Population, tau.common = FALSE)
capture.output(summary(HSM_M_metagen), file = "HeatShock/HSM_M_metagen_sum.txt")
HSM_M_metagen
## Number of studies combined: k = 18
##
## SMD 95%-CI z p-value
## Random effects model 322.5888 [310.1101; 335.0675] 50.67 0
##
## Quantifying heterogeneity:
## tau^2 = 436.0765 [262.0480; 1936.3667]; tau = 20.8824 [16.1879; 44.0042]
## I^2 = 69.9% [51.2%; 81.4%]; H = 1.82 [1.43; 2.32]
##
## Test of heterogeneity:
## Q d.f. p-value
## 56.42 17 < 0.0001
##
## Results for subgroups (random effects model):
## k SMD 95%-CI tau^2 tau Q I^2
## Population = YE 2 295.6367 [230.4706; 360.8028] 1858.0030 43.1046 5.80 82.7%
## Population = RE 2 299.3280 [237.0541; 361.6018] 1645.9981 40.5709 5.04 80.2%
## Population = GI 2 278.4127 [258.2987; 298.5267] 0 0 0.08 0.0%
## Population = MU 2 322.9962 [279.5264; 366.4659] 676.5451 26.0105 2.76 63.7%
## Population = MA 2 349.2955 [283.3611; 415.2299] 1908.2794 43.6839 5.89 83.0%
## Population = UM 2 336.4350 [283.8562; 389.0138] 1107.4937 33.2790 3.83 73.9%
## Population = KA 2 328.3924 [310.4407; 346.3441] 0 0 0.22 0.0%
## Population = VA 2 327.7797 [300.3089; 355.2504] 147.8583 12.1597 1.37 27.0%
## Population = AK 2 355.4177 [320.4275; 390.4078] 369.9475 19.2340 1.97 49.2%
##
## Test for subgroup differences (random effects model):
## Q d.f. p-value
## Between groups 23.13 8 0.0032
##
## Details on meta-analytical method:
## - Inverse variance method
## - DerSimonian-Laird estimator for tau^2
## - Jackson method for confidence interval of tau^2 and tau
# run the analysis with EK's code for quick plotting
HSM_M_meta <- metaAnalysisRandomModel(HSM_effects %>% filter(Sex == "M"))
p_HSM_M_meta_SE <- HSM_M_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, SEMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = Mstar + SEMstar, xmin = Mstar - SEMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with SE") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", HSM_M_meta$Qtest_het$Q),
hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", HSM_M_meta$Qtest_het$p),
hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_HSM_M_meta_CI <- HSM_M_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, ULMstar, LLMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = ULMstar, xmin = LLMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with 95% CI") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", HSM_M_meta$Qtest_het$Q),
hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", HSM_M_meta$Qtest_het$p),
hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_HSM_M_meta <- ggarrange(p_HSM_M_meta_SE, p_HSM_M_meta_CI)
p_HSM_M_meta
# get the effects in the right shape
Dia_effects <- Dia_fitted %>%
dplyr::select(-Value) %>%
mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")),
Lab = as.factor(Lab),
V = SE^2,
Study = paste(Population, Lab, sep = "_")) %>%
relocate(Population, Sex, Lab, Study) %>%
arrange(Population) %>%
dplyr::rename(Y = Estimate)
# run the analysis with metagen package
Dia_metagen <- metagen(data = Dia_effects %>% filter(Sex == "F"), TE = Y, seTE = SE, studlab = Study, sm = "SMD", fixed = FALSE, random = TRUE, method.tau = "DL")
Dia_metagen <- update.meta(Dia_metagen, subgroup = Population, tau.common = FALSE)
capture.output(summary(Dia_metagen), file = "Diapause/Dia_metagen_sum.txt")
Dia_metagen
## Number of studies combined: k = 27
##
## SMD 95%-CI z p-value
## Random effects model 0.7819 [0.7340; 0.8297] 32.02 < 0.0001
##
## Quantifying heterogeneity:
## tau^2 = 0.0136 [0.0122; 0.0456]; tau = 0.1164 [0.1103; 0.2136]
## I^2 = 92.9% [90.8%; 94.5%]; H = 3.75 [3.30; 4.27]
##
## Test of heterogeneity:
## Q d.f. p-value
## 366.19 26 < 0.0001
##
## Results for subgroups (random effects model):
## k SMD 95%-CI tau^2 tau Q I^2
## Population = YE 3 0.7851 [0.5785; 0.9918] 0.0310 0.1759 33.88 94.1%
## Population = RE 3 0.7506 [0.4866; 1.0146] 0.0512 0.2263 40.70 95.1%
## Population = GI 3 0.7201 [0.4489; 0.9914] 0.0544 0.2332 44.71 95.5%
## Population = MU 3 0.8095 [0.5951; 1.0240] 0.0335 0.1831 35.87 94.4%
## Population = MA 3 0.7790 [0.5798; 0.9782] 0.0285 0.1689 30.05 93.3%
## Population = UM 3 0.8798 [0.7335; 1.0261] 0.0139 0.1179 13.59 85.3%
## Population = KA 3 0.7577 [0.4953; 1.0201] 0.0514 0.2268 56.53 96.5%
## Population = VA 3 0.8031 [0.6432; 0.9630] 0.0174 0.1319 18.45 89.2%
## Population = AK 3 0.6772 [0.3523; 1.0021] 0.0799 0.2826 78.09 97.4%
##
## Test for subgroup differences (random effects model):
## Q d.f. p-value
## Between groups 2.33 8 0.9693
##
## Details on meta-analytical method:
## - Inverse variance method
## - DerSimonian-Laird estimator for tau^2
## - Jackson method for confidence interval of tau^2 and tau
# run the analysis with EK's code for quick plotting
Dia_meta <- metaAnalysisRandomModel(Dia_effects %>% filter(Sex == "F"))
p_Dia_meta_SE <- Dia_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, SEMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = Mstar + SEMstar, xmin = Mstar - SEMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with SE") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", Dia_meta$Qtest_het$Q),
hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", Dia_meta$Qtest_het$p),
hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_Dia_meta_CI <- Dia_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, ULMstar, LLMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = ULMstar, xmin = LLMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with 95% CI") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", Dia_meta$Qtest_het$Q),
hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", Dia_meta$Qtest_het$p),
hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_Dia_meta <- ggarrange(p_Dia_meta_SE, p_Dia_meta_CI)
p_Dia_meta
SR_effects <- SR_fitted %>%
dplyr::select(-Value) %>%
mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")),
Lab = as.factor(Lab),
V = SE^2,
Study = paste(Population, Lab, sep = "_")) %>%
relocate(Population, Sex, Lab, Study) %>%
arrange(Population) %>%
dplyr::rename(Y = Estimate)
# run the analysis with metagen package
SR_F_metagen <- metagen(data = SR_effects %>% filter(Sex == "F"), TE = Y, seTE = SE, studlab = Study, sm = "SMD", fixed = FALSE, random = TRUE, method.tau = "DL")
SR_F_metagen <- update.meta(SR_F_metagen, subgroup = Population, tau.common = FALSE)
capture.output(summary(SR_F_metagen), file = "Starvation/SR_F_metagen_sum.txt")
SR_F_metagen
## Number of studies combined: k = 27
##
## SMD 95%-CI z p-value
## Random effects model 92.2150 [88.2592; 96.1708] 45.69 0
##
## Quantifying heterogeneity:
## tau^2 = 95.1301 [58.5957; 208.2583]; tau = 9.7535 [7.6548; 14.4312]
## I^2 = 87.8% [83.5%; 91.0%]; H = 2.86 [2.46; 3.34]
##
## Test of heterogeneity:
## Q d.f. p-value
## 213.28 26 < 0.0001
##
## Results for subgroups (random effects model):
## k SMD 95%-CI tau^2 tau Q I^2
## Population = YE 3 79.1118 [69.3841; 88.8395] 59.4425 7.7099 10.58 81.1%
## Population = RE 3 90.3681 [78.2393; 102.4968] 98.6061 9.9301 14.58 86.3%
## Population = GI 3 90.1160 [73.0025; 107.2294] 211.5175 14.5436 27.83 92.8%
## Population = MU 3 98.8544 [88.4272; 109.2816] 71.2725 8.4423 13.10 84.7%
## Population = MA 3 90.7965 [79.3353; 102.2577] 89.1768 9.4433 16.29 87.7%
## Population = UM 3 92.7478 [81.4423; 104.0532] 83.2652 9.1250 12.39 83.9%
## Population = KA 3 94.2444 [81.1793; 107.3095] 118.6246 10.8915 19.05 89.5%
## Population = VA 3 100.3351 [88.4492; 112.2210] 96.0593 9.8010 16.24 87.7%
## Population = AK 3 93.1682 [84.0970; 102.2394] 51.1189 7.1497 10.21 80.4%
##
## Test for subgroup differences (random effects model):
## Q d.f. p-value
## Between groups 10.64 8 0.2229
##
## Details on meta-analytical method:
## - Inverse variance method
## - DerSimonian-Laird estimator for tau^2
## - Jackson method for confidence interval of tau^2 and tau
# run the analysis with EK's code for quick plotting
SR_F_meta <- metaAnalysisRandomModel(SR_effects %>% filter(Sex == "F"))
p_SR_F_meta_SE <- SR_F_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, SEMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = Mstar + SEMstar, xmin = Mstar - SEMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with SE") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", SR_F_meta$Qtest_het$Q),
hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", SR_F_meta$Qtest_het$p),
hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_SR_F_meta_CI <- SR_F_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, ULMstar, LLMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = ULMstar, xmin = LLMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with 95% CI") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", SR_F_meta$Qtest_het$Q),
hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", SR_F_meta$Qtest_het$p),
hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_SR_F_meta <- ggarrange(p_SR_F_meta_SE, p_SR_F_meta_CI)
p_SR_F_meta
# run the analysis with metagen package
SR_M_metagen <- metagen(data = SR_effects %>% filter(Sex == "M"), TE = Y, seTE = SE, studlab = Study, sm = "SMD", fixed = FALSE, random = TRUE, method.tau = "DL")
SR_M_metagen <- update.meta(SR_M_metagen, subgroup = Population, tau.common = FALSE)
capture.output(summary(SR_M_metagen), file = "Starvation/SR_M_metagen_sum.txt")
SR_M_metagen
## Number of studies combined: k = 27
##
## SMD 95%-CI z p-value
## Random effects model 67.0390 [64.1185; 69.9594] 44.99 0
##
## Quantifying heterogeneity:
## tau^2 = 50.9069 [34.4087; 122.9392]; tau = 7.1349 [5.8659; 11.0878]
## I^2 = 87.1% [82.5%; 90.6%]; H = 2.79 [2.39; 3.26]
##
## Test of heterogeneity:
## Q d.f. p-value
## 202.04 26 < 0.0001
##
## Results for subgroups (random effects model):
## k SMD 95%-CI tau^2 tau Q I^2
## Population = YE 3 57.5509 [49.0188; 66.0831] 48.3328 6.9522 14.65 86.4%
## Population = RE 3 65.2671 [57.3446; 73.1895] 39.4277 6.2791 10.88 81.6%
## Population = GI 3 63.5417 [53.6129; 73.4704] 66.6562 8.1643 15.86 87.4%
## Population = MU 3 73.9147 [66.5549; 81.2746] 33.7392 5.8085 10.71 81.3%
## Population = MA 3 66.0302 [56.5611; 75.4993] 61.3987 7.8357 17.99 88.9%
## Population = UM 3 69.1615 [59.9618; 78.3613] 56.4189 7.5113 15.09 86.7%
## Population = KA 3 69.6949 [61.7787; 77.6111] 40.1309 6.3349 12.25 83.7%
## Population = VA 3 70.8085 [60.8687; 80.7482] 68.5145 8.2773 19.86 89.9%
## Population = AK 3 67.6143 [60.8702; 74.3585] 27.1947 5.2149 9.18 78.2%
##
## Test for subgroup differences (random effects model):
## Q d.f. p-value
## Between groups 9.99 8 0.2660
##
## Details on meta-analytical method:
## - Inverse variance method
## - DerSimonian-Laird estimator for tau^2
## - Jackson method for confidence interval of tau^2 and tau
# run the analysis with EK's code for quick plotting
SR_M_meta <- metaAnalysisRandomModel(SR_effects %>% filter(Sex == "M"))
p_SR_M_meta_SE <- SR_M_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, SEMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = Mstar + SEMstar, xmin = Mstar - SEMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with SE") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", SR_M_meta$Qtest_het$Q),
hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", SR_M_meta$Qtest_het$p),
hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_SR_M_meta_CI <- SR_M_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, ULMstar, LLMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = ULMstar, xmin = LLMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with 95% CI") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", SR_M_meta$Qtest_het$Q),
hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", SR_M_meta$Qtest_het$p),
hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_SR_M_meta <- ggarrange(p_SR_M_meta_SE, p_SR_M_meta_CI)
p_SR_M_meta
Pgm_TotalPerc_effects <- Pgm_TotalPerc_fitted %>%
dplyr::select(-Value) %>%
mutate(Population = factor(Population, levels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")),
Lab = as.factor(Lab),
V = SE^2,
Study = paste(Population, Lab, sep = "_")) %>%
relocate(Population, Sex, Lab, Study) %>%
arrange(Population) %>%
dplyr::rename(Y = Estimate)
# run the analysis with metagen package
Pgm_TotalPerc_metagen <- metagen(data = Pgm_TotalPerc_effects %>% filter(Sex == "F"), TE = Y, seTE = SE, studlab = Study, sm = "SMD", fixed = FALSE, random = TRUE, method.tau = "DL")
Pgm_TotalPerc_metagen <- update.meta(Pgm_TotalPerc_metagen, subgroup = Population, tau.common = FALSE)
capture.output(summary(Pgm_TotalPerc_metagen), file = "Pigmentation/Pgm_TotalPerc_metagen_sum.txt")
Pgm_TotalPerc_metagen
## Number of studies combined: k = 27
##
## SMD 95%-CI z p-value
## Random effects model 22.1310 [18.4664; 25.7957] 11.84 < 0.0001
##
## Quantifying heterogeneity:
## tau^2 = 92.7608 [59.7248; 185.9682]; tau = 9.6312 [7.7282; 13.6370]
## I^2 = 98.4% [98.1%; 98.7%]; H = 7.95 [7.33; 8.62]
##
## Test of heterogeneity:
## Q d.f. p-value
## 1641.63 26 0
##
## Results for subgroups (random effects model):
## k SMD 95%-CI tau^2 tau Q I^2
## Population = YE 3 21.9253 [ 8.9080; 34.9427] 130.8658 11.4397 189.65 98.9%
## Population = RE 3 23.1491 [10.3955; 35.9027] 125.1476 11.1869 140.08 98.6%
## Population = GI 3 19.8218 [ 7.0653; 32.5783] 125.0353 11.1819 127.97 98.4%
## Population = MU 3 21.9975 [ 7.8889; 36.1060] 153.9193 12.4064 211.85 99.1%
## Population = MA 3 26.0765 [11.3607; 40.7923] 167.5581 12.9444 226.86 99.1%
## Population = UM 3 24.2945 [12.6483; 35.9406] 104.2371 10.2097 129.73 98.5%
## Population = KA 3 20.6854 [ 8.4856; 32.8852] 114.7403 10.7117 162.20 98.8%
## Population = VA 3 20.2816 [ 7.0677; 33.4956] 134.7945 11.6101 180.83 98.9%
## Population = AK 3 21.0641 [ 7.6242; 34.5041] 139.6157 11.8159 204.34 99.0%
##
## Test for subgroup differences (random effects model):
## Q d.f. p-value
## Between groups 0.71 8 0.9995
##
## Details on meta-analytical method:
## - Inverse variance method
## - DerSimonian-Laird estimator for tau^2
## - Jackson method for confidence interval of tau^2 and tau
# run the analysis with EK's code for quick plotting
Pgm_TotalPerc_meta <- metaAnalysisRandomModel(Pgm_TotalPerc_effects %>% filter(Sex == "F"))
p_Pgm_TotalPerc_meta_SE <- Pgm_TotalPerc_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, SEMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = Mstar + SEMstar, xmin = Mstar - SEMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with SE") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", Pgm_TotalPerc_meta$Qtest_het$Q),
hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", Pgm_TotalPerc_meta$Qtest_het$p),
hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_Pgm_TotalPerc_meta_CI <- Pgm_TotalPerc_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, ULMstar, LLMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = ULMstar, xmin = LLMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with 95% CI") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", Pgm_TotalPerc_meta$Qtest_het$Q),
hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", Pgm_TotalPerc_meta$Qtest_het$p),
hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_Pgm_TotalPerc_meta <- ggarrange(p_Pgm_TotalPerc_meta_SE, p_Pgm_TotalPerc_meta_CI)
p_Pgm_TotalPerc_meta
# run the analysis with metagen package
Pgm_TotalPercwoSchmidt_metagen <- metagen(data = Pgm_TotalPerc_effects %>% filter(Sex == "F" & Lab != "Schmidt"), TE = Y, seTE = SE, studlab = Study, sm = "SMD", fixed = FALSE, random = TRUE, method.tau = "DL")
Pgm_TotalPercwoSchmidt_metagen <- update.meta(Pgm_TotalPercwoSchmidt_metagen, subgroup = Population, tau.common = FALSE)
capture.output(summary(Pgm_TotalPercwoSchmidt_metagen), file = "Pigmentation/Pgm_TotalPercwoSchmidt_metagen_sum.txt")
Pgm_TotalPercwoSchmidt_metagen
## Number of studies combined: k = 18
##
## SMD 95%-CI z p-value
## Random effects model 27.8579 [24.5420; 31.1738] 16.47 < 0.0001
##
## Quantifying heterogeneity:
## tau^2 = 49.6504 [27.0335; 114.0840]; tau = 7.0463 [5.1994; 10.6810]
## I^2 = 96.5% [95.5%; 97.3%]; H = 5.37 [4.72; 6.11]
##
## Test of heterogeneity:
## Q d.f. p-value
## 490.22 17 < 0.0001
##
## Results for subgroups (random effects model):
## k SMD 95%-CI tau^2 tau Q I^2
## Population = YE 2 27.6321 [14.2166; 41.0476] 91.9909 9.5912 54.71 98.2%
## Population = RE 2 29.1938 [21.1505; 37.2370] 31.5726 5.6189 15.92 93.7%
## Population = GI 2 25.5462 [14.0961; 36.9963] 65.9414 8.1204 29.43 96.6%
## Population = MU 2 27.9465 [13.4112; 42.4819] 108.1892 10.4014 60.80 98.4%
## Population = MA 2 33.0233 [27.0389; 39.0077] 16.8248 4.1018 10.21 90.2%
## Population = UM 2 29.5135 [18.2354; 40.7917] 64.3465 8.0216 35.24 97.2%
## Population = KA 2 25.5088 [ 9.9951; 41.0224] 123.5766 11.1165 72.51 98.6%
## Population = VA 2 25.3214 [ 7.2895; 43.3534] 167.5076 12.9425 95.18 98.9%
## Population = AK 2 27.1328 [15.0911; 39.1746] 73.8066 8.5911 44.68 97.8%
##
## Test for subgroup differences (random effects model):
## Q d.f. p-value
## Between groups 2.52 8 0.9607
##
## Details on meta-analytical method:
## - Inverse variance method
## - DerSimonian-Laird estimator for tau^2
## - Jackson method for confidence interval of tau^2 and tau
# run the analysis with EK's code for quick plotting
Pgm_TotalPercwoSchmidt_meta <- metaAnalysisRandomModel(Pgm_TotalPerc_effects %>% filter(Sex == "F" & Lab != "Schmidt"))
p_Pgm_TotalPercwoSchmidt_meta_SE <- Pgm_TotalPercwoSchmidt_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, SEMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = Mstar + SEMstar, xmin = Mstar - SEMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with SE") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", Pgm_TotalPercwoSchmidt_meta$Qtest_het$Q), hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", Pgm_TotalPercwoSchmidt_meta$Qtest_het$p), hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_Pgm_TotalPercwoSchmidt_meta_CI <- Pgm_TotalPercwoSchmidt_meta$summary_effects_random %>%
dplyr::select(Population, Mstar, ULMstar, LLMstar) %>%
distinct() %>%
ggplot(aes(x = Mstar, y = 1:length(Population), color = Population)) +
theme_bw() +
geom_point(size = 4, shape = 15) +
geom_errorbarh(aes(xmax = ULMstar, xmin = LLMstar), height = 0) +
scale_y_continuous(name = "Population", breaks = 1:9,
labels = c("YE","RE","GI","MU","MA","UM","KA","VA","AK")) +
labs(x = "Summary effect", title = "Pop. summary effect with 95% CI") +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(Q) == %.4g", Pgm_TotalPercwoSchmidt_meta$Qtest_het$Q), hjust=-0.2, vjust=3.5, parse = T) +
annotate("text", x = -Inf, y = Inf, label = sprintf("italic(p) == %.4g", Pgm_TotalPercwoSchmidt_meta$Qtest_het$p), hjust=-0.2, vjust=5, parse = T) +
theme(legend.position = "none")
p_Pgm_TotalPercwoSchmidt_meta <- ggarrange(p_Pgm_TotalPercwoSchmidt_meta_SE, p_Pgm_TotalPercwoSchmidt_meta_CI)
p_Pgm_TotalPercwoSchmidt_meta
@ Schmidt lab, females were allowed to lay eggs for Xh, and viability is calculated as the percentage of individuals that emerged from total number of eggs, per vial.↩︎